View Full Version : Problem with email on different mail servers

11-23-2007, 04:19 PM
I am sending an email using php. This email message is in an html template (as newsletter emails are sent). All the styles (CSS) used are written inline. There are also some images used in html to set as background. The behaviour of this html, styles and images is different on gmail,yahoo and hotmail. I have been trying to fix this problem since last two weeks.
Yahoo override all the styles, and no styles and images are displayed
At the moment hotmail is showing it as i require.

In gmail the results are little different from as i require them to be

Please help me. Is there any special way to handle template for email to behave it in right way on all email servers.

Kindly help me. how i can fix this problem. It is urgent.

Waiting for your help.


11-23-2007, 06:42 PM
Here is an interesting link I found by SEARCHING - http://www.epigroove.com/posts/66/html_emails_vs_gmail_yahoo__hotmail

Here are some thoughts -

Make sure that you are sending the email with the proper headers to define it as a html email. Make sure the header newline characters are what your sending mail server expects (some expect \r\n and some only \n) in order to produce the proper header newline characters \r\n that the receiving mail servers expect.

Make sure that the resultant HTML/CSS content that goes into the email is valid. Use the markup validator - http://validator.w3.org/ and CSS validator - http://jigsaw.w3.org/css-validator/

In your case with Yahoo, make sure the email client is setup to treat the email as HTML instead of plain text.

If you post your code that generates the email (and the HTML template if it is a separate file) someone here can probably help with what is going on.

As long as the HTML/CSS is stand-a-loan (no relative url's) and is proper/valid HTML/CSS, it should render (mostly) in the email clients.