Adding mail server throung web.cfm fails

Hello everyone,

Today I’ve had an experience adding a mail server connection through web.cfm. We have different smtp providers set up for 3 individual sites which all reside on the same server (one Lucee install).

We have created new Amazon SES login credentials and we wanted to replace our test SMTP provider (configured on one of the sites to this new provider). Before we did this, we confirmed the new login credentials worked through our desktop dev instance.

Here’s the weird part:

  1. Change the info on the current provider through web.cfm. Save. Verify and get an error:
"535 Authentication Credentials Invalid ;lucee.runtime.exp.NativeException: 535 Authentication Credentials Invalid
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:965)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:876)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:780)
at javax.mail.Service.connect(Service.java:388)
at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:60)
Caused by: javax.mail.AuthenticationFailedException: 535 Authentication Credentials Invalid
... 5 more
"
  1. We know the creds are good… so… Delete the mail account through web.cfm. Add it again. Verify and get the same error.
  2. Delete the mail account through web.cfm, login to server.cfm, add it, verify and success.
    …and now the weird part…
  3. Delete it from server.cfm (I don’t want all 3 sites using this SES server), switch back to web.cfm, add it again, hit verify and voila… It works!!!

I was going to post a bug for this but the bug tracker says to post here first.

While not exactly the same, is very similar to the following two discussions:
https://dev.lucee.org/t/mail-server-for-cfmail/13199
https://dev.lucee.org/t/multiple-mail-server/11894/7
One talks about doing the same thing from the command line (so kinda of like through web.cfm - it’s site specific) and the other problem through web.cfm.

Adding first through server.cfm seems to be the workaround for the moment.

OS: Linux 22.0.04
Java Version: 11.0.22
Tomcat Version: 9.0.35
Lucee Version: 5.4.4.38