Jump to content

mail not sending


fife

Recommended Posts

Hi.  I am making an IT support ticketing system were a user raises a job.  They receive a thank you email and it then sends all the engineers a copy of the job.  The sending the user a thank you email works fine. its the sending to the engineers that seems to not work.  the worst part is it worked last week.  Ive just come back to it now and it seems to just not send the email.  It does however do the redirect at the end of the code.

 


//the code missing just adds the task to the database
$rAddProblem = mysql_query($qAddProblem);
		$redirect = 'Location: reported.php?id='.mysql_insert_id();
		$to = $_POST['email'];
		$subject = "Support Task Raised";
		$content =
		"Thank you for raising your support issue, an Engineer will be allocated to the job shortly.

Your task ID is ".mysql_insert_id()." and you can monitor the task at http://www.website.co.uk/tickets/

The details of the task are as follows:

Description: ".$_POST['description']."
Category: ".$_POST['category']."

You will be informed when we have dealt with your support issue, an engineer may contact you to discuss any problems.";
		mail($to, $subject, $content);

		$admContent =
		"A support task has been raised by ".$name." for ".$site."
The task ID is ".mysql_insert_id().", the user who raised the job will be informed when their support issue has been dealt with.

Description: ".$description;
		mail('itsupport@website.co.uk', $subject, $admContent);
		header ($redirect);		
	}
}

 

Any ideas?

 

thanks

 

Danny

Link to comment
Share on other sites

have you checked to make sure that the mail isn't being sent to the spam/junk email folder..?

have you debugged your code to make sure the mail function is failing..

 

$mail = mail(); //insert mail function info
if($mail){
      print "mail sent successfully";
}else{
      print "mail error";
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.