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 Quote Link to comment 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 = "me@example.com$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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.