您的位置:首页 > 其它

ANT发送邮件需要的3个JAR包

2013-10-18 11:29 513 查看
ANT发送邮件需要的3个JAR包:activation.jar、mail.jar、commons-email-1.2.jar

将这三个jar包放到 $ANT_HOME/LIB 路径下即可

内网发送邮件:

<target name="sendEmail">
<mail mailhost="internalmail.test.com" mailport="25" subject="SmokeTest Report!" messagefile="${JMeter.home}/extras/AutoTestReport${time}_failure.html" messagemimetype="text/html" tolist="${to_me_only}">
<from address="mim.zhang@test.com"/>
<fileset dir="${JMeter.home}/extras/">
<!-- <include name="AutoTestReport${time}.html"/> -->
<include name="expand.png"/>
</fileset>
<!-- <message>This email was sent automatically by ANT. <br />
Please check the automation test report by the link below.  <br />
If there are any questions, please contact with mim. Thank you! <br /><br /> http://SZCOMPUTER/AutoTestReport${time}.html </message> -->
</mail>
</target>


外网发送邮件

<target name="sendEmail">
<mail mailhost="stmp.qq.com" mailport="25" from="12345678@qq.com" user="12345678" password="*****" subject="SmokeTest Report!" messagefile="${JMeter.home}/extras/AutoTestReport${time}_failure.html" messagemimetype="text/html" tolist="${to_me_only}">
<fileset dir="${JMeter.home}/extras/">
<!-- <include name="AutoTestReport${time}.html"/> -->
<include name="expand.png"/>
</fileset>
<!-- <message>This email was sent automatically by ANT. <br />
Please check the automation test report by the link below.  <br />
If there are any questions, please contact with mim Zhang. Thank you! <br /><br /> http://SZCOMPUTER/AutoTestReport${time}.html </message> -->
</mail>
</target>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: