Jump to content

[SOLVED] sending email with html in it


heldenbrau

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/170698-solved-sending-email-with-html-in-it/
Share on other sites

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..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.