Mark Ross
Mark Ross

Reputation: 11

cfmail, google mail and reply to

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

<cfmail 
  from = "#email#"     
  To = "[email protected]" 
  failto="#email#"  
  server="smtp.gmail.com" 
  replyto="#email#" 
  port="465" 
  useSSL="true" 
  username="[email protected]" 
  password="*****"   
  Subject = "Confirmation Form"
>
    <cfmailparam name="Reply-To" value="#email#">

Upvotes: 1

Views: 1822

Answers (2)

Ben Doom
Ben Doom

Reputation: 7885

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.

Upvotes: 2

Sergey Galashyn
Sergey Galashyn

Reputation: 6956

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.

Upvotes: 1

Related Questions