Hari Rajagopal
2008-May-09 17:56 UTC
How to set Sender Name in the From: header in Action Mailer
I have setup ActionMailer to send mails via Gmail. Here are the settings: config.action_mailer.smtp_settings = { :address => "smtp.gmail.com", :port => "587", :domain => "example.com", :authentication => :plain, :user_name => "admin-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org", :password => "secret" } The "admin" username has an email account setup with a name of "Mailer Account" How do I set the From: header so that the user''s inbox shows the name on the account that the mail is sent from instead of the username "admin" that shows up currently. How do I get this to happen? Thanks in advance -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
kopf1988
2008-May-09 18:11 UTC
Re: How to set Sender Name in the From: header in Action Mailer
I think I did something like From "Master Chief <master_cheif-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org" It was very similar to that and it worked. On May 9, 12:56 pm, Hari Rajagopal <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have setup ActionMailer to send mails via Gmail. > > Here are the settings: > > config.action_mailer.smtp_settings = { > :address => "smtp.gmail.com", > :port => "587", > :domain => "example.com", > :authentication => :plain, > :user_name => "ad...-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org", > :password => "secret"} > > The "admin" username has an email account setup with a name of "Mailer > Account" > > How do I set the From: header so that the user''s inbox shows the name on > the account that the mail is sent from instead of the username "admin" > that shows up currently. > > How do I get this to happen? > > Thanks in advance > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hari Rajagopal
2008-May-09 18:57 UTC
Re: How to set Sender Name in the From: header in Action Mai
kopf1988 wrote:> I think I did something like > > From "Master Chief <master_cheif-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org" > > It was very similar to that and it worked. > > On May 9, 12:56 pm, Hari Rajagopal <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>I tried in the smtp settings :user_name => "Mailer Account <admin-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>", and it didn''t work -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Gmail does not let you alter the "from" email address when relaying. You can specify the "from" name in your mailer, but it will use the "from" address for the credentials that you supply to log into your account. I wanted emails to come from "My Company <webmaster-D4qZEMI14/jqlBn2x/YWAg@public.gmane.org>", but our webmaster account is a nickname for my account, so it does not have its own login credentials. Since I had to use my account information to log in, when I send an email, it will say "My Company <myaccountname-D4qZEMI14/jqlBn2x/YWAg@public.gmane.org>" in the "from" field. If you''re not using Gmail, specifying "from" in the mailer works fine. -Kyle On May 9, 1:57 pm, Hari Rajagopal <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> kopf1988 wrote: > > I think I did something like > > > From "Master Chief <master_ch...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org" > > > It was very similar to that and it worked. > > > On May 9, 12:56 pm, Hari Rajagopal <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > I tried in the smtp settings > > :user_name => "Mailer Account <ad...-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>", > > and it didn''t work > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Nimesh Nikum
2011-Jan-05 11:47 UTC
Re: How to set Sender Name in the From: header in Action Mai
I changed delivery method to :sendmail and it started to work for me :-) ActionMailer::Base.delivery_method = :sendmail I hope it helps to you also :-) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.