Posts Tagged ‘send html using php mail’

PHP – Header format to send html pages via mail function

May 11th, 2011

This is the following format to send an html mail using the mail function in php. It goes in the header.

 $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers  .= "From: $from\r\n"; 

Notice the “\r\n” at the end of each line. THAT MUST be there

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz