Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-23-2007, 03:19 PM #1
- Join Date
- Nov 2007
- Thanked 0 Times in 0 Posts
Problem with email on different mail servers
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, 05:42 PM #2
- Join Date
- Oct 2006
- Denver, Colorado USA
- Thanked 302 Times in 294 Posts
Here is an interesting link I found by SEARCHING - http://www.epigroove.com/posts/66/ht...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.If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.