sseeley Posted March 3, 2009 Share Posted March 3, 2009 Hoping someone can help. I am trying to post the following to a hotmail email account, but it just shows the HTML code, and will not display the email as I would like. Can anyone provide some advice? $to = $email_nonCrypt; $headers = 'From: [email protected]'; $subject = "New User Account"; $body = "<html><body><p style=\"font-family:arial; font-weight:normal; font-stretch:wider; font-size:14px; color:black;\">Welcome to 1083 accounts. Your new account has been created.<br/><br/>Your username is: " . $userName_nonEncrypt . "<br/>Your password is: " . $password . "<br/><br/>Please use the following link to log into the accounts system <a href=\"http://accounts.1083squadron.co.uk\">http://accounts.1083squadron.co.uk</a></p></body></html>"; echo $to . "<br/>"; echo $headers . "<br/>"; echo $subject . "<br/>"; echo $body . "<br/>"; mail($to, $subject, $body, $headers); Stuart Link to comment https://forums.phpfreaks.com/topic/147818-solved-php-email-to-hotmail/ Share on other sites More sharing options...
samshel Posted March 3, 2009 Share Posted March 3, 2009 try adding this to your headers... // To send HTML mail, the Content-type header must be set $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/147818-solved-php-email-to-hotmail/#findComment-775866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.