Jump to content

Archived

This topic is now archived and is closed to further replies.

glenelkins

Question about email headers

Recommended Posts

Ok, so why if i use:

[code]
mail ($recipient,"Test Title",$html_code,"From: no@no.com\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: no@no.com\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

Share this post


Link to post
Share on other sites
Have you tried:

[code]mail ($recipient,"Test Title",$html_code,"From: no@no.com \r\n Content-type: text/html");[/code]

??
Because either way should be fine.

Share this post


Link to post
Share on other sites

×

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.