coldfusionsendgridcfmail

Coldfusion CFMAIL and sendgrid


I have 2 clients on the same server that I host, that both send email through sendgrid.com (both have their own accounts).

I was looking at reports on sendgrid and noticed that categories from "client 1" were showing up in a report for "client 2".

I spent extensive time on the phone with sendgrid and they are telling me that a handful of emails 65 from a batch of 3000 for "client 1" show as being sent through "client 2"'s authenticated user.

In my scripting, I use coldfusion cfmail and I specify the SMTP address, username and password for that client into the tag.

A possible theory takes into account the "Maintain connection to mail server" check box under mail in the administrator.

"Select this check box to keep the connection to a mail server open for reuse after delivering a message (recommended)."

If both clients send email at the same time (very much possible) would the coldfusion mail spooling engine separate them out based on server/username and password or send them all through to the mail server that is currently open?

If I uncheck the maintain connection to mail server checkbox... what is the downside on resources? my clients send newsletters and transactional emails all day, maybe about 10k each client.


Solution

  • I ended up modifying the DNS settings in my servers, adding a cname that pointed to the smtp address, smtp.sendgrid.net. I then updated my code to use the new server names, and this seems to be separating the connections.