simon551 Posted July 20, 2009 Share Posted July 20, 2009 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.) Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 20, 2009 Share Posted July 20, 2009 ...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. Quote Link to comment Share on other sites More sharing options...
simon551 Posted July 21, 2009 Author Share Posted July 21, 2009 Sorry. They are seeing plain text. Quote Link to comment Share on other sites More sharing options...
simon551 Posted July 21, 2009 Author Share Posted July 21, 2009 Maybe I should have titled my post php mail gmail html problem. Gmail loads my email as raw html code. Quote Link to comment 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.