How can I set the Sender's address in Jenkins?

后端 未结 6 879
心在旅途
心在旅途 2021-01-30 19:16

I\'m sending mail from Jenkins to an anonymous SMTP relay internally. That relay then securely sends mail to exchange online via TLS on port 587. The transport works perfectly,

6条回答
  •  不思量自难忘°
    2021-01-30 19:54

    import javax.mail.Message.RecipientType
    import javax.mail.Address
    import javax.mail.internet.InternetAddress
    import javax.mail.internet.MimeMessage
    
    msg.setFrom(new InternetAddress("john...@server.com"))
    

提交回复
热议问题