SystemOverload Posted September 8, 2009 Share Posted September 8, 2009 Hi, I'm using PHP 5.2.6 and I need to send automatic emails to help users reset their passwords... I've received the email ok, but it displays the html, tags and all... Can anyone point me in the right direction to get it to display correctly? X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MTtTQ0w9Mw== X-Message-Status: n:0 X-SID-PRA: donotreplyATsomethingDOTcom X-Message-Info: JGTYoYF78jHqxCLOcGSmIalZsSnmX77i+0RJd3fM2tipTgPAv4DzSwwDAS9CLMZize0xQmoU6xgKXEmqN4kZmD40Qw+lF92P Received: from WebServer1.DNPwebhostingDOTcom ([213.175.208.2]) by snt0-mc2-f22.Snt0.hotmailDOTcom with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Sep 2009 11:39:44 -0700 Received: from WebServer1 ([127.0.0.1]) by WebServer1.DNPwebhostingDOTcom with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Sep 2009 19:40:20 +0100 Date: Tue, 08 Sep 2009 19:40:20 +0100 Subject: Password Reset Request... To: testATdestinationDOTcoDOTuk From: donotreplyATsomethingDOTcom Reply-To: donotreplyATsomethingDOTcom X-Mailer: PHP/5.2.6 Return-Path: donotreplyATsomethingDOTcom Message-ID: <WEBSERVER1nHM3SOlbp0000003aATWebServer1.DNPwebhostingDOTcom> X-OriginalArrivalTime: 08 Sep 2009 18:40:20.0042 (UTC) FILETIME=[D1312AA0:01CA30B3] <html> <body> <p> <a href='locateme.info/b/b_account.php?mode=options&reset=f8bd59688b7b309f865aca711e9e113f'> <b>CLICK TO RESET PASSWORD</b> </a> </p> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/173571-generating-html-email/ Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 you have to set the content type on your header. something like $headers .= "Content-type: text/html"; should do the trick Quote Link to comment https://forums.phpfreaks.com/topic/173571-generating-html-email/#findComment-914909 Share on other sites More sharing options...
SystemOverload Posted September 9, 2009 Author Share Posted September 9, 2009 Thanks, I managed to get it working, I'm looking at the combined HTML / Plain Text version now LOL... I've picked out the following from the message: --==Multipart_Boundary_xc75j85x Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Is the Content-Transfer-Encoding required? And what is it's recommended 'setting' for HTML and for Plain Text as I've seen a number of different variations Thanks Quote Link to comment https://forums.phpfreaks.com/topic/173571-generating-html-email/#findComment-915609 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.