Dear friends,

      I had an issue on setting up my e-mail account on Bamboo and due to that I would like to share my findings with you.

      1. Gmail Settings - Get started with IMAP and POP3

      Outgoing Mail (SMTP) Server - Requires TLS
      smtp.gmail.com
      Port: 465 or 587
      Requires SSL: Yes
      Requires authentication: Yes
      Use same settings as incoming mail server
      

      2. Setting up your e-mail using the Admin section

      Form Data from http://<bamboo-domain>/admin/saveMailServer.action
      name: Bamboo
      from: <USER>@atlassian.com
      prefix: [Bamboo]
      checkBoxFields: removePrecedence
      chosenMailSetting: SMTP
      selectFields: chosenMailSetting
      hostName: smtp.gmail.com
      smtpPort: 465
      userName: <USER>@atlassian.com
      passwordChange: true
      checkBoxFields: passwordChange
      password: <PASSWORD>
      tlsRequired: true
      checkBoxFields: tlsRequired
      jndiName:
      testRecipient: <USER>@atlassian.com
      sendTest: Test
      atl_token: 9f655d50f0e8f331c5cbfc824c5b1e53f6658dc4
      

      2.1. Using <smtpPort:465> and <tlsRequired:true|false> provides an error

      Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1

      2.2. Using <smtpPort:587> and <tlsRequired:true|false> email gets sent out

      3. Setting up your e-mail editing <server.xml> file

      <bamboo-install>/conf/server.xml
      <!--Resource name="mail/GmailSmtpServer"
                 auth="Container"
                 type="javax.mail.Session"
                 mail.smtp.host="smtp.gmail.com"
                 mail.smtp.port="465"
                 mail.smtp.auth="true"
                 mail.smtp.user="<USER>@atlassian.com"
                 password="<PASSWORD>"
                 mail.smtp.starttls.enable="true"
                 mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
               /-->
      

      "mail.smtp.port" set as 587 does not work at all, instead, use 465

      "mail.smtp.auth" needs to be set as TRUE, otherwise:
      The mail settings you entered were not valid. Error thrown was: com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 ga9sm26068813vdc.22 - gsmtp

      "mail.smtp.starttls.enable" can be set as TRUE or FALSE and the email gets sent away with no error(s) and/or warning(s).

      Form Data from http://<bamboo-domain>/admin/saveMailServer.action
      name: Bamboo
      from: <USER>@atlassian.com
      prefix: [Bamboo]
      checkBoxFields: removePrecedence
      chosenMailSetting: JNDI
      selectFields: chosenMailSetting
      hostName:
      smtpPort:
      userName:
      password:
      checkBoxFields: tlsRequired
      jndiName: java:comp/env/mail/GmailSmtpServer
      testRecipient: <USER>@atlassian.com
      sendTest: Test
      atl_token: 9f655d50f0e8f331c5cbfc824c5b1e53f6658dc4
      

      4. Comparing settings

      According to test results presented above, if you decide on using *ONLY* the form in the Admin section, you must set the smtpPort as 587.
      
      Otherwise, if you edit the <server.xml> file you must set the smtpPort as 465.
      




      Please, let me know if you are experiencing the same issue as described above and we will investigate it further.

      I would suggest adding comments to this issue as well as voting on the same to increase its popularity and likelihood of being fixed in a future release.

      Please refer to the documentation for more information on Atlassian's bug fixing policy

      -
      Kind regards,
      Rafael P Sperafico
      Atlassian Support

            [BAM-14399] Different ports when setup gmail SMTP server

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 1441012 ] New: JAC Bug Workflow v3 [ 3385303 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            Oleksandr Tkachenko made changes -
            Resolution New: Timed out [ 10 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            Oleksandr Tkachenko made changes -
            Labels New: bamboo-bugs-grooming
            Alexey Chystoprudov made changes -
            Component/s New: Administration (General) [ 11370 ]
            jonah (Inactive) made changes -
            Symptom Severity New: Minor [ 14432 ]
            Owen made changes -
            Workflow Original: Bamboo Workflow 2016 v1 [ 1416297 ] New: Bamboo Workflow 2016 v1 - Restricted [ 1441012 ]
            Marek Went (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2014 v2 [ 634323 ] New: Bamboo Workflow 2016 v1 [ 1416297 ]
            Alexey Chystoprudov made changes -
            Status Original: Needs Triage [ 10030 ] New: Open [ 1 ]
            Alexey Chystoprudov made changes -
            Summary Original: Setting up email on Bamboo New: Different ports when setup gmail SMTP server
            Rafael Sperafico (Inactive) created issue -

              Unassigned Unassigned
              rsperafico Rafael Sperafico (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: