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>

最新文章

  1. C#多线程之基础篇3
  2. linq多表join与group
  3. javascript的基本语法、数据结构
  4. android之旋转的刻度盘
  5. lintcode:Coins in a Line 硬币排成线
  6. CentOS卸载openoffice
  7. oschina大数据开源软件
  8. Linux服务器上安装vsftpd
  9. iOS8 UILocalNotification 添加启动授权
  10. 玩转BLE(1)_Eddystone beacon
  11. bootstrap-table使用详解
  12. linux系统自签发免费ssl证书,为nginx生成自签名ssl证书
  13. 通过.frm和.ibd恢复mysql数据
  14. mysql LAST_INSERT_ID详解
  15. linux mint 安装 SecureCRT
  16. mockito使用
  17. 最好最实用的二次开发教程 cms
  18. 利用Object.defineProperty 简化 Chrome插件本地存储操作
  19. L014-第三关课前linux命令及基础知识考试手把手实战解答小节
  20. Html5的新特性总结

热门文章

  1. 如何提取一个转录本的3&#39;UTR区域的序列
  2. Linux 各类设置、配置、使用技巧参考,Linux使用集锦
  3. uva-10344
  4. 本地yum源快速创建
  5. Xshell图形界面启动
  6. LiveBinding应用 dataBind 数据绑定
  7. as3 arguments.callee与... (rest)
  8. vue基础——vue实例
  9. Spring Boot 菜鸟入门(持续更新)
  10. Wilcoxon Signed Rank Test