• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • mailer-plugin
    • None
    • Platform: All, OS: All

      When I attempt to configure Hudson to use my gmail account for sending emails, I
      am unable to configure it to use TLS. When I use the SSL that it allows, I receive:

      java.net.SocketException: java.security.NoSuchAlgorithmException: Error
      constructing implementation (algorithm: Default, provider: SunJSSE, class:
      sun.security.ssl.DefaultSSLContextImpl)

          [JENKINS-2206] Add support of TLS for Mailer plugin

          Can you post the entire stack trace?

          Kohsuke Kawaguchi added a comment - Can you post the entire stack trace?

          esmithbss added a comment -

          Created an attachment (id=352)
          Resulting Stack Trace from email attempt.

          esmithbss added a comment - Created an attachment (id=352) Resulting Stack Trace from email attempt.

          Alan Harder added a comment -

          See related request JENKINS-5206 for same feature in email-ext plugin.

          Alan Harder added a comment - See related request JENKINS-5206 for same feature in email-ext plugin.

          Alan Harder added a comment -

          Duplicate JENKINS-2368 mentioned:

          This can be fixed on the java mail api setting this property:

          props.put("mail.smtp.starttls.enable","true");

          Alan Harder added a comment - Duplicate JENKINS-2368 mentioned: This can be fixed on the java mail api setting this property: props.put("mail.smtp.starttls.enable","true");

          firstlux added a comment -

          Please note that there is a work-around for enabling TLS.

          The Hudson Mailer class first loads System.getProperties() when initializing the Properties object for Java Mail. As such, you may add 'mail.smtp.starttls.enable="true"' property to System Properties when starting up Hudson.

          $ java -Dmail.smtp.starttls.enable="true" -jar hudson.war

          firstlux added a comment - Please note that there is a work-around for enabling TLS. The Hudson Mailer class first loads System.getProperties() when initializing the Properties object for Java Mail. As such, you may add 'mail.smtp.starttls.enable="true"' property to System Properties when starting up Hudson. $ java -Dmail.smtp.starttls.enable="true" -jar hudson.war

          antonystubbs added a comment -

          Unfortunately, adding a "Global properties" entry for this doesn't appear to work.

          But, adding it to the JAVA_OPTS variable in /etc/init.d/tomcat6 works.

          antonystubbs added a comment - Unfortunately, adding a "Global properties" entry for this doesn't appear to work. But, adding it to the JAVA_OPTS variable in /etc/init.d/tomcat6 works.

          Deepak Arora added a comment -

          If running Jenkins on Tomcat under Windows, enter the below line at the end in the JAVA tab of the tomcat7w.exe
          Dmail.smtp.starttls.enable="true"

          Deepak Arora added a comment - If running Jenkins on Tomcat under Windows, enter the below line at the end in the JAVA tab of the tomcat7w.exe Dmail.smtp.starttls.enable="true"

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - https://github.com/jenkinsci/mailer-plugin/pull/76

            Unassigned Unassigned
            esmithbss esmithbss
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: