0

尝试完成 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

这在过去可以正常工作,但我将它单独放置了几个星期,现在它无法正常工作。任何想法为什么这不起作用?

4

1 回答 1

0

不知道。可能有一种方法可以为 ant 任务打开 JavaMail 会话调试,这可能会为您提供有关问题所在的线索,或者至少可以帮助您确定这是 ant 问题还是邮件发送问题。

于 2012-06-28T04:48:52.823 回答