[Jenkins]怎样自定义发出邮件的 From Email Address 和 From Name

在Jenkins上建了一个执行SoapUI的task,想要自定义发送邮件的地址和姓名,怎么办呢?

在Editable Email Notification里面添加Pre-send Script

脚本如下:

import javax.mail.Message.RecipientType
import javax.mail.Address
import javax.mail.internet.InternetAddress
import javax.mail.internet.MimeMessage def senderAddress = "AutoTester@companyname.com"
def fromName = "Automation Test"
msg.setFrom(new InternetAddress(senderAddress,fromName ))
上一篇:SQL Server 复制系列(文章索引)


下一篇:SQL Server 复制:事务发布(读写分离)