Jump to content

How to send HTML email?


dragonusthei

Recommended Posts

Its to do with the headers in the mail
[code]
<?php
$to = "[email protected]
$subject = "Test Mail";
$body = "<html>\n"
."<head>\n"
."<title>Test Mail</title>\n"
."</head>\n"
."<body>\n"
."This is an email<br />\n"
."</body>\n"
."</html>\n";

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

mail($to, $subject, $body, $headers);
?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/21707-how-to-send-html-email/#findComment-96934
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.