Q695 Posted October 29, 2008 Share Posted October 29, 2008 Why is't the file working properly? //e-mail script else { $aid=1; //$_GET['ad_id']; $key=2; //$_SESSION['key']; $to="**@**"; $subject="Confirm your post on Assertive Classifieds"; //message body $message=" <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html> <head> <title>Confirm your post on Assertive Classifieds</title> </head> <a href=\"***\">Please click here to activate your ad.</a> </body> </html> "; //e-mail from $from="invalid@***"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; if ((strstr($to, "@") && (strstr($from, "@") && ($subject) && ($message)))) { mail($to, $subject, $message, $headers); echo "Mail sent"; } else { echo "Mail was unable to be sent at this time due to an e-mail issue."; } } Link to comment https://forums.phpfreaks.com/topic/130650-html-in-e-mail-script-help-needed/ Share on other sites More sharing options...
crochk Posted October 29, 2008 Share Posted October 29, 2008 Make sure you have the correct headers for HTML: $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; Link to comment https://forums.phpfreaks.com/topic/130650-html-in-e-mail-script-help-needed/#findComment-677957 Share on other sites More sharing options...
Q695 Posted November 13, 2008 Author Share Posted November 13, 2008 thanks. Link to comment https://forums.phpfreaks.com/topic/130650-html-in-e-mail-script-help-needed/#findComment-689112 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.