Search code examples
ruby-on-railsemailgmailactionmailer

Gmail does not detect the reply-to field


I have following settings in my FeedbackMailer.

def notification(feedback)

  from       "[email protected]"
  subject    "Some feedback"
  recipients "[email protected]"
  reply_to   feedback.creator.email
  body({ :feedback => feedback })
  content_type "text/html"
end

I am using [email protected] account to send emails for this application. The emails are delivered perfectly. And when I check the details of the email after receiving it, I see following:

from     "[email protected]"
reply-to "[email protected]"
to       "[email protected]"

Now when I press on the reply button in the gmail interface, the to field should now have the "[email protected]" but it is having "[email protected]". Am I doing something wrong or gmail is?


Solution

  • As the thread Waseem pointed out in a comment indicated.

    Gmail ignores the reply-to when the From is one of your configured send-as addresses in gmail. I don't know why.

    I took this as a hint and replaced the From email field by the [email protected] and added the same [email protected] as a Reply-to address. Gmail now uses the Reply-to field correctly.