How to configure Jenkins email Notifications through outlook?

You need to add this java argument to the Jenkins command line:

-Dmail.smtp.starttls.enable=true      # Starts TLS for Office365 SMTP Authentication

To do this, you have to find the script that kicks off Jenkins at system startup. On a Mac, with standard Jenkins installation, it would be in "/Library/Application Support/Jenkins/jenkins-runner.sh"

And looks something like this:

#!/bin/bash
#
# Startup script used by Jenkins launchd job.
# Mac OS X launchd process calls this script to customize
# the java process command line used to run Jenkins.
#
# Customizable parameters are found in
# /Library/Preferences/org.jenkins-ci.plist
#
# You can manipulate it using the "defaults" utility.
# See "man defaults" for details.

defaults="defaults read /Library/Preferences/org.jenkins-ci"

war=`$defaults war` || war="/Applications/Jenkins/jenkins.war"

javaArgs="-Dfile.encoding=UTF-8"
javaArgs="$javaArgs -Djava.awt.headless=true"
javaArgs="$javaArgs -Dmail.smtp.starttls.enable=true"
javaArgs="$javaArgs  -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Vancouver"
javaArgs="$javaArgs -Dhudson.DNSMultiCast.disabled=true"
...

Finally I could figure out the problem. I have missed

Default user e-mail suffix =  @mycompany.com

Also, I unchecked

Use SSL

Added following param in Jenkins.xml file in Jenkins root directory

-Dmail.smtp.starttls.enable=true      # Starts TLS for Office365 SMTP Authentication

These are my final changes

1. SMTP server=smtp.office365.com
2. Default user e-mail [email protected]
3. Use SMTP Authentication (Checked)
4. User Name = [email protected]
5. password = ********************

 **6. Use SSL (Un-Checked)**

7. SMTP Port = 587
8. Reply-To Address = [email protected]
9. Charset = UTF8

Here is Screen Shot

BOOOM ... !!!


to start jenkins from war file use

java -Dmail.smtp.starttls.enable="true" -jar jenkins.war --httpPort=9090