Jump to content

gmail mail not getting my html


simon551

Recommended Posts

I've been sending emails from my program for a while using the following code to generate an html email header. This has been working fine - it's a company intranet application that has a couple of outside people who receive some emails. Travel agents to be specific. There haven't been any issues going on a year or so with this but now one of the travel agents switched to gmail for email and gmail isn't digging my code.

$random_hash = md5(date('r', time()));

//email contents follow
$body=
'
--PHP-alt-'. $random_hash.' 
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

You need to enable html email in order to receive the travel request in an email. You will need to check the application for the request. 

--PHP-alt-'.$random_hash.' 
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<p>message text etc.</p>

Let me know if I need to post more code (if you think this is a problem with my html I'll gladly post more.)

Link to comment
https://forums.phpfreaks.com/topic/166710-gmail-mail-not-getting-my-html/
Share on other sites

...gmail isn't digging my code.

 

What does that mean, exactly? Based on the title of your post I "assume" it means that the user does not even receive the email, but I never like to assume. Or do they received the email but it only shows the plain text version? PLease be specific.

 

Assuming they do not receive the email, have you had the user check their "Spam" folder in Gmail? If it is marked as spam the user can configure Gmail to always allow those messages.

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.