Uploaded image for project: 'Magnolia Mail Module'
  1. Magnolia Mail Module
  2. MGNLMAIL-125

Allow configuration of newer security protocols when sending emails

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.5.13
    • 5.5.11
    • None
    • Yes
    • DevX 11
    • 5

      Using a Mail Server configured to use TLS v.1.2 (for example)

      configure the following parameters:

      servier: smtp.office365.com
      port: 587
      'Use STARTTLS'
      

      This throws and errorĀ  'could not convert socket to TLS'.

      Some mail servers are deprecating the use of SSL based protocols in favor of TLS, so it is not possible to use the Mail Module OOTB for that cases (see)

      Workaround:

      1. Create a class that extends info.magnolia.module.mail.MailTemplate
      2. Override info.magnolia.module.mail.MailTemplate.initSession() method to add the following line in order to force version 1.2 of the protocol:
        props.put("mail.smtp.ssl.protocols", "TLSv1.2");
      3. Create a class that extends info.magnolia.module.mail.commands.MailCommand that uses the template created in steps 1 and 2 to create and send the email.

      Proposed solution
      Add one more property to smtpConfiguration named "sslProtocols" to allow user input their desired version. If this value exist, add it to property "mail.smtp.ssl.protocols" to use that version.

        Acceptance criteria

          There are no Sub-Tasks for this issue.

              chuong.doan Chuong Doan Huy
              miruela Mercedes Iruela
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 4d 0.5h
                    4d 0.5h