php mail not working perfectly with outlook

Posted by user1309524 on Stack Overflow See other posts from Stack Overflow or by user1309524
Published on 2012-04-11T05:23:13Z Indexed on 2012/04/11 5:28 UTC
Read the original article Hit count: 116

Filed under:
|

I have a problem using PHP to send mail. The mail is received by Outlook correctly, but it does not show the "From" address in the e-mail.

$subject = $_POST['message_subject'];
$message = $_POST['speaker_description'];
$email   = $_POST['email'];
$option  = $_POST['sel_reg_options'];
$email   = substr_replace($email ,"",-1);

$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From:My Name<[email protected]>\r\n";
$headers .= "Reply-To: Registration of Interest<[email protected]>\r\n";          
$headers .= "MIME-Version: 1.0"."\r\n";
$mail_sent = @mail($email,$subject,$message,$headers);

© Stack Overflow or respective owner

Related posts about php

Related posts about outlook