heldenbrau Posted August 17, 2009 Share Posted August 17, 2009 I want to use php to send a verification email with a link in it. The user clicks the link to verify their account. But when I send the link with html in it, the email is just sent as text and the actual code appears in the email. Also this email goes straight into the spam bin with a phishing warning. Should I be using another method to do this becuase other verification emails from other sites never go into the spam bin. Quote Link to comment https://forums.phpfreaks.com/topic/170698-solved-sending-email-with-html-in-it/ Share on other sites More sharing options...
oni-kun Posted August 17, 2009 Share Posted August 17, 2009 First of all make sure your SMTP server is not in the black lists, also make sure your FROM: header is not too long.. I noticed on mine, when I had '[email protected]' it was marked as spam, because phishers would normally use long domains for fraud. As for your code not appearing.. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; You need to add those headers to show it as an html form, so the mail client won't convert it to entities.. Quote Link to comment https://forums.phpfreaks.com/topic/170698-solved-sending-email-with-html-in-it/#findComment-900281 Share on other sites More sharing options...
heldenbrau Posted August 17, 2009 Author Share Posted August 17, 2009 Thanks for that. It might be because I used the loopback address for the website on my hardrive. Quote Link to comment https://forums.phpfreaks.com/topic/170698-solved-sending-email-with-html-in-it/#findComment-900451 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.