Ant电子邮件IOException

时间:2012-06-27 14:03:42

标签: email ant javamail

尝试完成ant邮件任务后,我收到了一个无用的错误。以下是有问题的代码:

<mail mailhost="smtp.gmail.com" user="blah" password="blahblah" enableStartTLS="true" subject="jMeter test results from nightly build.">
<from address="me@from.com"/>
<to address="me@me.com"/>
<message>This is an automated message containing results from the most recent discovery build.</message>
<attachments>
    <fileset dir="${basedir}">
        <include name="JMeter-Results*"/>
    </fileset>
</attachments>
</mail> 

这就是错误:

[jmeter] Tidying up remote @ Wed Jun 27 07:40:08 MDT 2012 (1340804408618)
[jmeter] ... end of run
 [xslt] Processing C:\ant-Jmeter\Needed Files\JMeterResults.jtl to C:\ant-Jmeter\Needed Files\JMeter-Results.html
 [xslt] Loading stylesheet C:\ant-Jmeter\Needed Files\jmeter-results-detail-report_21.xsl
 [mail] Sending email: jMeter test results from nightly build.
 [mail] Failed to send email: IOException while sending message

BUILD FAILED
C:\ant-Jmeter\Needed Files\build.xml:22: Problem while sending mime mail:
Total time: 5 minutes 24 seconds

这曾经在过去工作过,但我把它独自留了几个星期,现在却无法正常工作。任何想法为什么这不起作用?

1 个答案:

答案 0 :(得分:0)

不知道。可能有一种方法可以为ant任务打开JavaMail会话调试,这可能会让您知道出现了什么问题,或者至少可以帮助您确定是否存在蚂蚁问题或邮件发送问题。