Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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