dragonusthei Posted September 22, 2006 Share Posted September 22, 2006 Hello,How do i sent html emails through a PHP form?When ever i add tags useing mail(); they are just recived as the tags in the message Link to comment https://forums.phpfreaks.com/topic/21707-how-to-send-html-email/ Share on other sites More sharing options...
onlyican Posted September 22, 2006 Share Posted September 22, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.