Tutorial :Sending mail with ColdFusion CFMAIL with no local SMTP server


I am using a shared ColdFusion host (Crystaltech) but am using Google domain mail for my email needs. When I use CFMAIL to send mail from this server, I tried using Gmail's SMTP. It however rewrites any from address I specify to the gmail account I'm using for SMTP.

I've heard others talk of using Yahoo. Anybody have any good solutions for this?

Thanks in advance.


After searching around, it is my conclusion that Chase is correct in saying that this is by design and cannot be circumvented. Granted what I found was from 2005, but I can't find anything later saying that this can be done. References below.




The way I'm understanding your issue is that you'd like the "from" to be dynamic, based on an account you specify for each message vs. the master account that you're using as the sender mailservice. In order to accomplish this, you need to establish any other "from" account you plan to use within your application as an alternate address within Google Mail.

You will find the option to establish these linked accounts in Google Mail's Settings --> Accounts interface. There, you can add however many additional accounts you need, sending each an email to verify your ownership. Once you have verified, then you should be able to use any of those accounts as an authorized sender, via your master account.


This is by design. What you want to do is continue to use Gmail, but set the Reply-To field to the address you want responses to come back to. Many email clients will actually show the Reply-To value as "From" in the UI.


Assuming CT is providing an SMTP server you aren't using, I'd make sure I had an SPF record that allowed Crystaltech's SMTP server to send for my domain, then just use the provided mailserver.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »