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('[email protected]', $subject, $admContent);
		header ($redirect);		
	}
}

 

Any ideas?

 

thanks

 

Danny

Link to comment
https://forums.phpfreaks.com/topic/245016-mail-not-sending/
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
https://forums.phpfreaks.com/topic/245016-mail-not-sending/#findComment-1258526
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.