I guess it is first time I see Yahoo mail doing some thing with flying colors and Gmail failing at it. I must be missing some thing.
I used ant mail task for automated delivery of test report -
<target name="sendtestreport">
<tstamp>
<format property="current.time" pattern="MM/dd/yyyy hh:mm" />
</tstamp>
<property name="subject" value="Selenium Test Report: " />
<mail mailhost="test.de" mailport="25" subject="${subject} ${current.time}"
user="seleniumtests@test.de" password="password" messagemimetype="text/html">
<from address="seleniumtests@test.com" />
<replyto address="test@gmail.com" />
<to address="test@gmail.com" />
<message src="${basedir}\test-output\emailable-report.html">If you have trouble viewing the message then open attachment</message>
<attachments>
<fileset dir="${basedir}">
<include name="**/emailable-report.html"/>
</fileset>
</attachments>
</mail>
</target>
Here in I am sending emailable test report which is generated by TestNG in body (as well as attachment) of mail. In my Gmail account message is badly mis formatted, no colors are displayed, text is overlapping and misaligned. While in Yahoo mail it appears perfect.
Is there any setting I need to modify in Gmail to have message displayed in right format. Or is it defective behavior of Gmail?