在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 ))