so heres my info to start
config/initializers/mailer.rb
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "mydomain.com",
:user_name => "myUser",
:password => "secret",
:authentication => "plain",
:enable_starttls_auto => true
}
ActionMailer::Base.delivery_method = :smtp
app/mailers/notifier.rb
class Notifier < ActionMailer::Base
default :from => "My Company <info@mydomain.com>"
def contact_notification(sender)
@sender = sender
mail(
:to => "info@mydomain",
:from => sender.email,
:subject => "Message from #{sender.fullName} on Mydomain.com")
end
end
My issue, whenever the emails get sent to me they show the smtp account as the from header email address instead of the senders email. So I can’t just hit reply to reply to the senders email account.
Any Help would be appreciated.
Up-Date
With the the insite given I found a way to set the Reply-to email Header which did the trick.
Instead of using:
:from => sender.email,
I used
:reply_to => sender.email,
Hope this helps anyone else out there.
This seems specific to the gmail SMTP server see the information here:
http://mail.google.com/support/bin/answer.py?hl=en&answer=22370
This is the applicable section:
Other than setting that in the web interface for gmail as it suggests, have you tried the Reply-To header? That might work