0

Environment details

  • Jenkins version 2.107.1
  • java version "1.8.0_161"
  • macOS High Sierra 10.13.3 (17D47)
  • Mailer Plugin 1.21

Following are the setting that I've applied inside Manage Jenkins -> Configure System

Jenkins Locataion

System Admin e-mail address = myname@companyname.com

E-mail Notification

  • SMTP server = smtp.office365.com
  • Default user e-mail suffix = (kept empty)
  • Use SMTP Authentication = checked (enabled)
  • User Name = myname@companyname.com
  • Password = *****
  • Use SSL = (kept unchecked)
  • SMTP Port = 587
  • Reply-To Address = myname@companyname.com
  • Charset = UTF-8

When I try to test email using "Test configuration" button on the same page, I'm getting following error.

javax.mail.MessagingException: 501 5.5.4 Invalid domain name [HK2PR02CA0178.apcprd02.prod.outlook.com] ...

What's the wrong configuration that I've given?

In addition I've added following line in my jenkins-runner.sh, which is inside /Library/Application Support/Jenkins

javaArgs="$javaArgs -Dmail.smtp.starttls.enable=true" # Starts TLS for Office365 SMTP Authentication
AnujAroshA
  • 4,623
  • 8
  • 56
  • 99
  • did you try `Use SSL` to `checked`? because you are passing java arg. so remove java arg and enable the checkbox. Did you get the same result? – SV Madhava Reddy Apr 10 '18 at 08:24
  • @SVMadhavaReddy yes, I've tried out that and it will provide `javax.net.ssl.SSLException` message – AnujAroshA Apr 10 '18 at 09:06

0 Answers0