HTML mail fails for some email addresses

the mail() function

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Mon Jun 06, 2011 10:50 pm

HTML mail fails for some email addresses

Postby TheTsar » Mon Jun 06, 2011 11:19 pm

I wonder if you have come across this problem before...

I use 2 different hosting companies for a number of sites. One is Godaddy in the US, the other is Unlimited in the UK.

I’d had some problems sending html emails from a contact form on one of my sites (hosted by Unlimited) so I did some troubleshooting.

I put up a simple php script that sends a very simple html email to 2 different email addresses.
The 2 email addresses are all accounts on Outlook on the same pc.
1 of the emails is hosted by Unlimited, 1 is hosted by Godaddy.
When the emails arrive in Outlook the Godaddy email is displayed as html and looks ok. The Unlimited email is plain text with the html tags showing and the
information regarding the sender of the email has been removed.

If I look at the ‘faulty’ email on the server via webmail it looks ok ie is in html and the sender address is shown.
If I look at the ‘faulty’ email on my blackberry it looks ok as well.

If I move the php script to a Godaddy server the mails are all received ok ie all are html and all have the correct sender info.

If I change the addresses in the script to gmail and hotmail addresses they work ok as well.

If I change the script to send plain text mails there is no problem.

So I can’t see that the script is wrong and I can’t see that there is an issue with the PC (eg virus scan on the mails or something) or with the Outlook settings.
And since the mail looks ok via webmail and on blackberry the only thing that’s left is when Outlook gets the mail from the Unlimited server. However this doesn’t make
sense either since Outlook gets a mail sent from the Godaddy script from the Unlimited server correctly.

Any ideas or suggestions?


User avatar
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: HTML mail fails for some email addresses

Postby Nullsig » Tue Jun 07, 2011 4:23 am

Some e-mail clients specifically only will show e-mails in plain-text (for security reasons, or because they are poorly designed). Usually there is an option to allow HTML headers to be read. But there may not be.

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests