Jump to content

From Header Showing 'Unkown' In Hotmail? Why?


PHP-Nut

Recommended Posts

 $to = $row_GetID['email_addr'].',[email protected]';
$subject = 'Thank you for your www.mywebaddress Order'.' ('.$row_GetID['ordernum_ID'].')';

$headers = 'From:[email protected]';
if (mail($to, $subject, $body,$headers)) {
  echo("<p>Email Sent To Customer Successfully!</p>");
} else {
  echo("<p>Email To Customer Failed!</p>");
  }?>

 

This Code Snippet works fine with normal email programs, such as outlook express but if i download the emails in hotmail, then the from header seams to display as Unknown? In the recieved Emails List,  even tho if u open the email Itself, it does show the correct from email address? (ie our Website email address)

 

Is the code wrong in anyway?  :confused:

 

Thanks Paul.

 

 

No, That Doesnt work either,  :(

 

When i got a email notification from MSN messenger with that code it said 'message from .'

and then in the livemail it said 'unknown' and on opening the email it was showing the correct address????  :confused:

 

do you think its down to the web host?

 

Thanks Paul.

No, That Doesnt work either,  :(

 

When i got a email notification from MSN messenger with that code it said 'message from .'

and then in the livemail it said 'unknown' and on opening the email it was showing the correct address????  :confused:

 

do you think its down to the web host?

 

Thanks Paul.

 

I'd recommend including the MIME headers. I'm not 100% sure if the above example was correct.. but let me show you mine. The web host usually doesn't have control of much btw..

 

// Headers
$header = "From: ".$_POST['name']." <[email protected]> " . "\r\n"; //replace POST and address in <>..
$header .= 'MIME-Version: 1.0' . "\n";
$header .= 'Content-type: text/html; charset=UTF-8' . "\r\n";

 

This makes MSN assume it is a real message and treats it with more compatability.

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.