Details
-
Improvement
-
Resolution: Fixed
-
Normal
-
5.5.11
-
None
-
-
Empty show more show less
-
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:
- 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.
Checklists
Acceptance criteria
Attachments
1.
|
Implement |
|
Completed | Chuong Doan Huy | ||||||||
2.
|
Review code |
|
Closed | Oanh Thai Hoang |
|
|||||||
3.
|
piQA |
|
Completed | Javier Benito | ||||||||
4.
|
Final QA |
|
Completed | Oanh Thai Hoang |
|
|||||||
5.
|
DOCSub: Mention sslProtocols in section Configuring SMTP |
|
Closed | Martin DrĂ¡pela |