2

Im having an issue with using coldfusion and google SMTP. The issue is this, I have everything set up so when an email is sent out it will use google's SMTP relay. Now that works however, the server I have the site on also has another site that uses google's SMTP relay as well. So for some reason when a customer purchases something from one site 1 (and gets there order confirmation) and a different customer orders something from site 2 (and gets there order confirmation), the FROM email on site 2 is switched to the FROM email on site 1.

Example:

Customer purchases from site 1 - FROM="cs@site1.com"

A different customer purchases from site 2 - FROM="cs@site1.com" (this should be cs@site2.com)

I know this sounds confusing and it has me stumped. Any help would be appreciated.

Mike Pisanchik
  • 159
  • 1
  • 3
  • 11

2 Answers2

4

Are you using different accounts to connect to GMail?

If I remember correctly, GMail will change the 'FROM' on any email to match the email address of the account you are logging in with.

Scott Stroz
  • 7,510
  • 2
  • 21
  • 25
  • Scott is correct. If you use youremailaddress@gmail.com as the user in the cfadmin that is sending all email it will always send as that user. You need a smtp server either on your server or with a 2rd part ( your ISP may provide one ) to send mail as anyone@anydomain.com – Paul Sep 10 '12 at 22:20
  • If emails list is not changed frequently, you can add other addresses to the Gmail settings and put them in From when sending mail. – Sergey Galashyn Sep 11 '12 at 10:40
  • I have 2 different gmail accounts for each site. I also didn't set up anything in the cfadmin because I didn't want them conflicting. I have all the gmail settings in the application.cfm file. So Im not sure why it would be conflicting if I am using 2 different settings. – Mike Pisanchik Sep 12 '12 at 13:20
1

I was having a very similar problem and this question helped me figure out a solution.

We host multiple sites who send out mail via AuthSMTP. Our email issues started after upgrading from Coldfusion 7 to Coldfusion 10. It seemed like emails were being sent out with the incorrect 'FROM' address, but what was really happening was much more sinister.

Coldfusion 9 and 10 have a setting in the Coldfusion Administrator called "Maintain connection to the mail server.

enter image description here

Our issue was:

  1. Client "A" sent out an email, and the connection to the mail server was kept open

  2. Client "B" sent out an email using the open connection. The new SMTP credentials were being ignored by Coldfusion. Client "A"'s SMTP credentials were being used.

  3. AuthSMTP rejected client "B"'s email because it was trying to send out using Client "A"'s account, but the FROM address used by client "B"'s email was not registered with the account.

I hope that's not too confusing. I turned off the setting in the control panel and hopefully that will solve the problem. If not, I'll update my answer.

Community
  • 1
  • 1
clone45
  • 8,952
  • 6
  • 35
  • 43