Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66205

Can't override SMTP port with "Use TLS" enabled

XMLWordPrintable

    • 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

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

              Created:
              Updated:
              Resolved: