Reputation: 81
Okay, so this is a really weird issue that's really just confusing the crap out of me...
I have a number ColdFusion sites running on the same dedicated server and have been noticing some really strange issues with mail sent from some sites using the <cfmail>
tag.
Here is an example of a mail tag being used with a form on one of the websites:
<cfmail to="#cfmail.clientEmail#" from="#form.email# <#form.email#>" replyto="#form.email#" server="#cfmail.server#" username="#cfmail.username#" password="#cfmail.password#" subject="Request for info - #form.propertyName#" type="HTML" port="#cfmail.port#" useSSL="#cfmail.useSSL#">
(All of the cfmail scoped vars are being set in the Application file)
I do it this way so that the individual sites are not all using the in-house mail server, and instead use their own Google Apps account (DNS is set up properly).
Form submits, email sends, email is delivered...no problem, right?
Well...that's when things get funky.
Notice the FROM looks like this in the code:
from="#form.email# <#form.email#>
When delivered, it looks like this:
FROM : [email protected] <[email protected]>
When it SHOULD look like this:
FROM : [email protected] <[email protected]>
So, I checked - and re-checked the code. Everything is correct. Then, I checked the ColdFusion mail spooler...the text file generated there before the email actually leaves the server is CORRECT.
This leads me to believe that something is happening after the actual data reaches the google servers - somehow the email addresses are getting swapped out.
If it's any help, the mixed up from addresses are always email addresses that were set up a long time ago and then closed/abandoned for other sites I host on the same server.
And, another bit of funkyness to add...
This is happening to the TO addresses in some cases as well. Meaning, emails sent from different sites on the same server (using different Google Apps accounts and credentials) are ending up in the correct inbox AND other, unrelated, sites inboxes as well.
I've determined that the emails are correct as they leave the building on their way to Google (via the ColdFusion mail spooler) - but things seem to go all wonky after that.
Does anyone have any advice on this? The solution I've decided on for now is to move the clients to new mail providers...but this is not an ideal solution because of all the hassle involved in migrating their email over.
Upvotes: 2
Views: 326