用Ant发邮件 Ant MAIL
2015-12-25 11:29
337 查看
<target name="sendEmail"> <mail mailhost="smtp.isoftstone.com" mailport="25" user="XX@isoftstone.com" password="***" ssl="false" from="XX@isoftstone.com" subject="JMeter功能回归测试报告" messagemimetype="text/html" tolist="XX@alibaba-inc.com"> <fileset dir="${location}/report"> <include name="${ReportName}.html"/> <include name="*.png"/> </fileset> <message charset="gb2312">测试</message> </mail> </target>
T发邮件必须要加上mail.jar、commons-email-1.2.jar、activation.jar放在ANT目录下的lib子目录下
对于常见属性的说明:
1、 mailhost mail 服务器的地址
2、 mailport mail服务器的端口
3、 replyto 回复mail地址
4、 tolist 收件地址列表 可用子标签替代
5、 cclist 抄送地址列表 可用子标签替代
6、 bcclist 暗送地址列表 可用子标签替代
7、 message 邮件内容 一个或多个<message>子标签替代
8、messagefile 文件列表文件内容将被做为邮件内容, 一个或多个<message>子标签替代
9、messagemimetype 邮件类型, 默认为
text/plain 10、filset 附件列表 多个附件逗号或空格隔开 用<fileset> 子标签替代
11、user 发送邮箱的用户名
12、password 发送邮箱的密码
13、 subject 邮件标题
14、 charset 字符集
15、 encode 编码
16、 ssl 是否使用 TLS/SSL
相关文章推荐
- HDU2476 String painter 区间DP
- grails 私有库相关设置
- linker command failed with exit code 1 (use -v to see invocation)
- VS 程序“***”不包含适合于入口点的静态“Main”方法
- poj 3714Raid(最近点对)
- 白手起家学习数据科学 ——Naive Bayes之“测试模型篇”(十)
- Xcode7环境下,NSURLSession/NSURLConnection HTTP load failed
- 在用户空间程序也使用container_of()
- NSSearchPathForDirectoriesInDomains用法
- NSSearchPathForDirectoriesInDomains用法
- Codeforces Round #336 (Div. 2)A. Saitama Destroys Hotel 水题
- OC中属性关键字(retain, assign, copy...)
- svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted
- 'Could not find a storyboard named 'Main' in bundle NSBundle ***
- Shanghai
- Run-Time Check Failure #2
- IntelliJ 创建main函数快捷
- 上海寰享Odoo9企业版推介会
- leetcode -- Contains Duplicate III -- 重点,medium题目
- 【LEETCODE】172-Factorial Trailing Zeroes