• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • email-ext-plugin
    • None
    • 2.84

      Hi,

      I believe there is a bug with the "Use TLS" support that was added recently. With this option enabled, setting the SMTP port has no effect and 587 is always used.

      I believe line 333 in the ExtendedEmailPublisherDescriptor is the issue here https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java#L333 and it should be the same as line 308 but I am not able to easily test this at the moment.

      I've set the priority on this ticket to minor as I think this can be worked around by not setting this option and using the method that people used before this option was added but I haven't tested this workaround.

      I've included a log below showing that it's sending to port 587 while in the config view it's clearly set to 26.

      11:11:23.666 Sending email to: <EMAIL_ADDRESS>
      11:11:23.666 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
      11:11:23.669 DEBUG SMTP: useEhlo true, useAuth false
      11:11:23.669 DEBUG SMTP: trying to connect to host "<SMTP SERVER>", port 587, isSSL false
      11:11:23.670 Connection error sending email, retrying once more in 10 seconds...
      11:11:33.670 DEBUG SMTP: useEhlo true, useAuth false
      11:11:33.671 DEBUG SMTP: trying to connect to host "<SMTP SERVER>", port 587, isSSL false
      11:11:33.671 Connection error sending email, retrying once more in 10 seconds...
      11:11:43.672 Failed after second try sending email

      Thanks,
      Kian

          [JENKINS-66205] Can't override SMTP port with "Use TLS" enabled

          Basil Crow added a comment -

          wwuck FYI

          Basil Crow added a comment - wwuck FYI

          Tom added a comment -

          I've submitted a PR with the suggested fix at https://github.com/jenkinsci/email-ext-plugin/pull/302

          Tom added a comment - I've submitted a PR with the suggested fix at https://github.com/jenkinsci/email-ext-plugin/pull/302

          Basil Crow added a comment -

          Thanks for submitting a PR, wwuck!

          Incremental build email-ext-2.84-rc1508.0845c458b458 is available for testing. The incremental build is available from: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/email-ext/2.84-rc1508.0845c458b458/

          km_0000, can you please test the incremental build and confirm the issue is resolved? For instructions on how to install a custom build, see: https://www.jenkins.io/doc/book/managing/plugins/#advanced-installation

          Basil Crow added a comment - Thanks for submitting a PR, wwuck ! Incremental build email-ext-2.84-rc1508.0845c458b458 is available for testing. The incremental build is available from: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/email-ext/2.84-rc1508.0845c458b458/ km_0000 , can you please test the incremental build and confirm the issue is resolved? For instructions on how to install a custom build, see: https://www.jenkins.io/doc/book/managing/plugins/#advanced-installation

          Kian added a comment -

          Hi Basil, I tested the build and I can confirm that it fixes the problem.

          Kian added a comment - Hi Basil, I tested the build and I can confirm that it fixes the problem.

          Basil Crow added a comment -

          Fixed in jenkinsci/email-ext-plugin#302. Released in 2.84.

          Basil Crow added a comment - Fixed in jenkinsci/email-ext-plugin#302 . Released in 2.84 .

            wwuck Tom
            km_0000 Kian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: