Mail Server Connections

I have another email-related question:

If I have two Mail Server connections, and I want certain emails to be sent only through the second connection (and not the first connection), how do I do that?

Thanks,

-RR

You can put the SMTP-Connection into the cfmail.

There is a Example: “Send basic email message overriding default SMTP server”.

I always add the mail server configuration as @David_Raschper linked too in my applications instead of using the default SMTP server in Lucee. Just makes it easier to swap and change them as well as easier to deploy code between servers without needing to setup SMTP on the server.

With Lucee 5 you can now define your mailserver(s) in Application.cfc, which also avoids the need to do so in the admin.

2 Likes