I host my own server and have 2 clients who I use SENDGRID as an SMTP host for.
Each client gets their own username and password and sends mail through smtp.sendgrid.net. In my application I add the server, username and password tag into the cfmail tag to route those emails directly bypassing my cfadmin settings.
I recently discovered a program where messages from "client 1" and showing up as being send as "client 2".
After speaking with sendgrid regarding the problem, they have their logs showing that the session is being authenticated as client2 and not client 1 and that their system is appropriately storing them based off that data.
Out of a batch of 3000 emails sent by client 1, 65 of them are attributed to client 2.
After looking around, the only thing I was able to consider was the Cfadmin maintain connection option under mail.
I was wondering, if anyone knows the criteria to which coldfusion keeps the connection open for. If my theory holds correct, coldfusion only checks for a SMTP server and ignores the username/password when maintaining an option connection. So if a email from client 1 opens the connection, and then it stays open, an email from client 2 may slip into the outgoing batch.
For right now, I unchecked the maintain open connection tab to see if that has an effect, but I fear it will hog resources on a larger batch of messages.
Going on the above theory on server names, I'm in the process of setting up an alternate DNS record with a cname so that I can use "sendgrid.mydomain.com" to reference smtp.sendgrid.net. I'm hoping that is enough to allow coldfusion to create a connection to the new server and allow me to use the maintain open connection tab.
Any insight?