TLS v1.2 Support for CFMAIL just added in the 5.3.4.34-SNAPSHOT

The problem with CFMAIL not supporting the TLS 1.2 has been fixed, if anyone who has been affected could test the latest SNAPSHOT that would be great.

https://luceeserver.atlassian.net/browse/LDEV-1933

in addition, @isapir posted a simple cfml workaround for anyone having problems with older Lucee releases

<cfscript>
System = createObject("java", "java.lang.System");
System.setProperty("mail.debug", "true");
System.setProperty("mail.smtp.ssl.protocols", "TLSv1.2");
</cfscript>

<cfset smtpServer = {
   server   : "smtp.sparkpostmail.com"
  ,port     : 587
  ,useTLS   : true
  ,async    : false
  ,username : "SMTP_Injection"
  ,password : "SECRET"
}>

<cfmail from="noreply@lucee.org" to="noreply@lucee.org" 
  subject="Test #getTickCount()#" 
  attributeCollection="#smtpServer#">This is a test @ #now()#</cfmail>

<p>EOF
3 Likes

Thanks @Zackster. To clarify, the workaround is just setting the property mail.smtp.ssl.protocols.

The mail.debug property and async : false are only used to help troubleshoot issues.

Async: false means send immediately, rather than spool so any problems get triggered immediately

This needs testing with different mail servers / providers. As noted in the bug, Office365 currently has issues with JDK 8.

Please test and let us know if you encounter any problems with the mail server you are using.

1 Like

The Office365 issue has been resolved in 5.3.4.36