randyvogl Posted December 20, 2008 Share Posted December 20, 2008 So here is the premise of the issue I have two places on my website where I am attempting to automatically send emails if a form is submitted using the mail() function. The first is a registration page, this works great email completes successfully and everyone is happy. The second location is the problem, it is being stopped by exchange IMF I believe it is this line that is causing the error when I print this line $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields it displays the following results "From: Do Not Reply" and missed the whole right half which has the send from: which I believe is flagging it in IMF but I can't figure out what is wrong with this syntax? Any thoughts? Ohh and this is the exact same code that is used on the other outbound email that works correctly which adds to my confusion. //this is a section of code to send the user an email confirmation with their username and password attached $Name = "Do Not Reply"; //senders name $email = "[email protected]"; //senders e-mail address $recipient = $_POST['email']; //recipient $mail_body = "Your file has been uploaded"; //mail body $subject = "Upload"; //subject $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields ini_set('Do not reply', '[email protected]'); //Suggested by mail($recipient, $subject, $mail_body, $header); //mail command Link to comment https://forums.phpfreaks.com/topic/137772-making-exchange-imf-compliant-email-using-mail/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.