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

Allow configuration of newer security protocols when sending emails

    XMLWordPrintable

Details

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

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

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