开发者

Java based mailer not displaying properly in gmail

I have made a java mailer which is not displayin开发者_运维知识库g properly in gmail, but it is showing up properly in hotmail. In gmail, the CSS is not getting read properly, which disturbs the entire layout.


Follow a couple of rules:

  1. If possible, just design everything in a table. Keep fixed layout.
  2. Don't use CSS file reference. Just do styling in the elements.
  3. Try avoiding images or at least keep as minimal as company's logo only.
  4. Keep limited number of links in E-mails. This point is to avoid your automated mails to go in junk folder.
  5. Avoid complex CSS rules.

Updated

By the way, you must set content type "text/html". You may look couple of good already done examples:

  • Real's How to: http://www.rgagnon.com/javadetails/java-0504.html
  • Another detailed and good worked out example: http://www.vipan.com/htdocs/javamail.html

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜