Uploaded image for project: 'Commons Email'
  1. Commons Email
  2. EMAIL-106

STARTTLS is only enabled if an authenticator is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3
    • None

    Description

      The STARTTLS parameter is only set if an authenticator is used, whereas the two features are independent: it would also make sense to use STARTTLS without authentication, so as to protect eavesdropping of the e-mail content, for example.

      Here is a patch for src/java/org/apache/commons/mail/Email.java (rev. 1088801):

      @@ -481,9 +481,9 @@ public abstract class Email implements EmailConstants
                   properties.setProperty(MAIL_HOST, this.hostName);
                   properties.setProperty(MAIL_DEBUG, String.valueOf(this.debug));
       
      +            properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
                   if (this.authenticator != null)
                   {
      -                properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
                       properties.setProperty(MAIL_SMTP_AUTH, "true");
                   }
      

      Attachments

        Activity

          People

            sgoeschl Siegfried Goeschl
            brunoharbulot Bruno Harbulot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: