STARTTLS command not executed for SMTP mail.

Description

Setting an SMTP starttls mail server in Lucee is failing with the correct Port "587" and TLS enabled box checked when message is trying to be sent.

"Must issue a STARTTLS command first."

Found a workaround for it by using java instead of the tag. But making this wokr would make things a lot easier when migraitng apps from one server to another

Environment

Lucee 5.1 with NGINX in MAC OS x - El Capitan 10.11.4

Activity

Igal Sapir 28 May 2018 at 04:56

I am actually experiencing this issue when defining this.mailServers in Application.cfc but the same SMTP settings work when passed as an attributeCollection.

Javier Roque 29 November 2016 at 14:58

Ok, sorry for the delay, here's the stack trace
And no, this is not a gmail account.

(replaced the server named for privacy policies reasons)

Igal Sapir 28 November 2016 at 17:24
Edited

> Just to clarify... was the "this.mailservers" declared on /../WEB-INF/lucee/context/application.cfc?
No. Actually I defined the mail server in the Admin, but "exported" the data from there to show it.

Are you sending from a gmail account?

Please add the following attribute to your cfmail tag: async="false"

And post the full error message with the Java stack trace.

Javier Roque 28 November 2016 at 17:05

Tried in another MAC from my workstation and got the same error, will research more about it.... perhaps some java options are taken form the machine running the server itself? Just to clarify... was the "this.mailservers" declared on /../WEB-INF/lucee/context/application.cfc?

Igal Sapir 27 November 2016 at 23:52

Can't reproduce. Tested Lucee 5.1.1.30-SNAPSHOT on Windows 10 64-bit with Java 1.8u112 with the following Server settings (notice TLS and port 587):

And the following script code:

Email was sent and received successfully.

If you still believe that there is a problem then please provide a way to reproduce it.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

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

Sprint

Created 23 November 2016 at 22:31
Updated 14 May 2020 at 08:35
Resolved 28 May 2018 at 05:13