首页 文章

邮件正文在Gmail中出现乱码

提问于
浏览
2

我想这是我第一次看到雅虎邮件做了一些鲜艳的事情而Gmail失败了 . 我肯定错过了什么 .

我用ant邮件任务自动交付测试报告 -

<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>

在这里,我发送可邮寄的测试报告,该报告由TestNG在邮件正文(以及附件)中生成 . 在我的Gmail帐户邮件格式错误,没有显示颜色,文本重叠和未对齐 . 虽然在雅虎的邮件中看起来很完美 .

我是否需要在Gmail中修改任何设置,以便以正确的格式显示消息 . 或者是Gmail的行为有缺陷?

1 回答

相关问题