Duplicate
Details
Details
Assignee
Unassigned
UnassignedReporter
Ryan Stille
Ryan StillePriority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 16 September 2021 at 16:29
Updated 20 September 2021 at 08:26
Resolved 20 September 2021 at 08:26
The following code will not deliver mail using TLS:
<cfmail from="#from#" to="#to#" subject="Test message" async="false" server="#mailserver#" usetls="true">...
But this will deliver mail using TLS:
<cfmail from="#from#" to="#to#" subject="Test message" async="false" server="#mailserver#" usetls="true" username="anyStringHere">...
Zac pointed out the problem is likely with line 462 of SMTPClient.java: https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/net/smtp/SMTPClient.java#L462
Instead of
props.remove("mail.smtp.starttls.enable");
That line should probably be the same as line 453:
props.put("mail.smtp.starttls.enable", tls ? "true" : "false");
Also see https://dev.lucee.org/t/can-only-get-lucee-to-use-tls-when-sending-mail-if-i-provide-a-username-and-password/8887