1

I am having problems with google mail with a coldfusion webform, when the form gets sent the reply address is always myemail@myemail.com (substituted). Is this a google mail thing or is there a fix?

<cfmail 
  from = "#email#"     
  To = "myemail@myemail.com" 
  failto="#email#"  
  server="smtp.gmail.com" 
  replyto="#email#" 
  port="465" 
  useSSL="true" 
  username="myemail@myemail.com" 
  password="*****"   
  Subject = "Confirmation Form"
>
    <cfmailparam name="Reply-To" value="#email#">
ale
  • 6,369
  • 7
  • 55
  • 65
Mark Ross
  • 11
  • 2

2 Answers2

2

I don't believe Google Mail allows you to send mail from an address not tied to the account.

I would suggest, regardless of the SMTP server you use, using a real address tied to that domain for the "from" attribute. Set the reply-to and on-behalf-of (I think I got that right) headers to the email of the person "sending" the message.

I will give you one warning about sending lots of automated mail through Google. I was working on a project, and was told to use Google mail to send out a large amount of email. After about a day, they stopped sending out any mail on that account.... but accepted the mail. That is, their SMTP server told CF that the mail had been accepted, then trashed it instead of sending. I'd strongly suggest running your own SMTP server if you send more than a couple dozen emails a day.

Ben Doom
  • 7,865
  • 1
  • 27
  • 30
1

I can't remember about personal accounts, but sending mail through Google Apps definitely allows customized Reply To, and this works with replyto attribute of cfmail -- without cfmailparam. Possibly it is the way to handle this problem.

Sergey Galashyn
  • 6,946
  • 2
  • 19
  • 39
  • no, still replies to the server address. I only put that param in as a test. – Mark Ross May 19 '11 at 11:03
  • I don't have access to a Google apps account atm, but I would guess that if you are still sending "from" a non-associated address, it's stripping out all the headers and replacing them. again, just a guess. – Ben Doom May 23 '11 at 17:52