Jump to content

Question about email headers


glenelkins

Recommended Posts

Ok, so why if i use:

[code]
mail ($recipient,"Test Title",$html_code,"From: [email protected]\n Content-type: text/html");
[/code]

does the email come through showing the HTML code rather than the content, but if i do it this way it works fine:

[code]
$headers = "From: [email protected]\n";
$headers .= "Content-type: text/html";
mail ($recipient,"Test Title",$html_code,$headers);
[/code]

Not really a problem, just wondering why it does not work with the first method
Link to comment
https://forums.phpfreaks.com/topic/11159-question-about-email-headers/
Share on other sites

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.