2

In my rails application, I am using gmail SMTP settings.But even though I gave this ActionMailer::Base.default :from => 'some@emailaddress.com' in my environments file , The from address which showing in the email is the user_name field which I gave in the SMTP settings along with the password.

Is there any way to display any custom email address?

Pls comment If u didn't get my question

shajin
  • 3,214
  • 5
  • 38
  • 53
  • what happens when you hit the reply button? Does it at least send to the right address? – stephenmurdoch Jul 27 '11 at 03:03
  • I've given default :reply_to => "some@add.ress". And it is working when i hit reply button.But I want to display any custom email address in the header.. – shajin Jul 27 '11 at 03:14
  • http://stackoverflow.com/questions/1332510/how-to-change-from-address-when-using-gmail-smtp-server << This link is saying like we can't. Somebody please confirm. – shajin Jul 27 '11 at 03:15

2 Answers2

3

Either send from the gmail account you really want to be the sender, use a non-gmail SMTP server (that allows setting other senders), or use Amazon SES.

Jeremy Weathers
  • 2,556
  • 1
  • 16
  • 24
0

Try setting :sender instead of :from.

Maurício Linhares
  • 39,901
  • 14
  • 121
  • 158