Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-39740

SSLException when configuring outgoing mail to use the Office 365 SMTP Server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.3.4, 7.1.4, 7.2.3, 7.8.0, 8.0.2
    • Email notifications

    Description

      Steps to reproduce

      1. Configure with the following details:
        • Protocol: SECURE_SMTP
        • Hostname: smtp.office365.com
        • SMTP Port: 587
        • TLS:
        • Username: xxx@office365_domain.com
      2. Test connection.

      Expected Behaviour:

      The connection successful.

      Actual behaviour:

      The following exception showed up in the UI:

      Unfortunately no connection was possible. Review the errors below and rectify:
      
      SSLException: Unrecognized SSL message, plaintext connection?
      

      In the logs:

      2014-08-28 16:25:29,718 http-bio-8626-exec-12 ERROR admin 985x537x1 191e62f 0:0:0:0:0:0:0:1 /secure/admin/VerifySmtpServerConnection!update.jspa [plugins.mail.webwork.VerifyMailServer] Unable to connect to the server at smtp.office365.com due to the following exception: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
      

      Workaround:

      JNDI configuration
      1. Stop JIRA.
      2. Move the following three files from $JIRA_INSTALL/atlassian-jira/WEB-INF/lib to $JIRA_INSTALL/lib.
        • activation-x.y.z.jar
        • javax.mail-x.y.z.jar
        • javax.mail-api-x.y.z.jar
          x.y.z denotes the version of the jar file.
      3. Add the following into $JIRA_INSTALL/conf/server.xml
        <Resource name="mail/Office365"
            auth="Container"
            type="javax.mail.Session"
            mail.smtp.host="smtp.office365.com"
            mail.smtp.port="587"
            mail.smtp.auth="true"
            mail.smtp.user="xxxx@xxx.onmicrosoft.com"
            password="xxyyzz"
            mail.smtp.starttls.enable="true"
            mail.transport.protocol="smtps"
        /> 
        

        Make sure it's located in between the <Context> ... </Context> tag. Replace the user and password accordingly.

      4. Restart JIRA
      5. Create the mail server
      6. Fill in Name, Description, From address, Email prefix.
      7. At the jndi location, enter the following:
        java:comp/env/mail/Office365
        
      8. Don't need test the connection and directly save the settings.
      9. Try send a test email and see if JIRA can pick up the mail settings.
      SMTP settings from office365:

      You can double confirm your smtp mail server settings, you can check it under the user outlook account:

      1. Sign in to your account using Outlook Web App. For help signing in, see Sign in to Outlook Web App.
      2. In Outlook Web App, click Settings settings > Options > Account > My account.
      3. On the My account page, click Settings for POP or IMAP access.
      4. The POP3, IMAP4, and SMTP server name and other settings you may need to enter are listed on the Settings for POP or IMAP Access page under POP setting or IMAP setting, and SMTP setting.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yen@atlassian.com TeckEn (Inactive)
            Votes:
            30 Vote for this issue
            Watchers:
            37 Start watching this issue

            Dates

              Created:
              Updated: