fife Posted August 17, 2011 Share Posted August 17, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/245016-mail-not-sending/ Share on other sites More sharing options...
AyKay47 Posted August 17, 2011 Share Posted August 17, 2011 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"; } Quote Link to comment https://forums.phpfreaks.com/topic/245016-mail-not-sending/#findComment-1258526 Share on other sites More sharing options...
fife Posted August 17, 2011 Author Share Posted August 17, 2011 yeah literary no errors. No server errors. Just nothing and still no emails being sent. Quote Link to comment https://forums.phpfreaks.com/topic/245016-mail-not-sending/#findComment-1258536 Share on other sites More sharing options...
AyKay47 Posted August 17, 2011 Share Posted August 17, 2011 have you implemented the code that I provided into your code..? if so, what is the browser outputting? Quote Link to comment https://forums.phpfreaks.com/topic/245016-mail-not-sending/#findComment-1258538 Share on other sites More sharing options...
fife Posted August 17, 2011 Author Share Posted August 17, 2011 the browser is just sending you to the confirmation page even with the extra code. Quote Link to comment https://forums.phpfreaks.com/topic/245016-mail-not-sending/#findComment-1258557 Share on other sites More sharing options...
fife Posted August 17, 2011 Author Share Posted August 17, 2011 ar. no tell a lie. Mail error popped up this time. Quote Link to comment https://forums.phpfreaks.com/topic/245016-mail-not-sending/#findComment-1258561 Share on other sites More sharing options...
AyKay47 Posted August 17, 2011 Share Posted August 17, 2011 and if the mail function is not working.. it will most certainly send an error to the error.log, make sure you have error_reporting set to E_ALL Quote Link to comment https://forums.phpfreaks.com/topic/245016-mail-not-sending/#findComment-1258578 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.