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 = "donotreply@xxxxxxxx.com"; //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', 'donotreply@xxxxxxxx.com'); //Suggested by mail($recipient, $subject, $mail_body, $header); //mail command Quote Link to comment 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.