-
Improvement
-
Resolution: Fixed
-
Normal
-
5.5.11
-
None
-
-
Empty show more show less
-
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:
- Create a class that extends info.magnolia.module.mail.MailTemplate
- 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"); - 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.