I think this is an example of stackoverflow-driven development.  Unless I 
misunderstand you, the answer you seek is already in the Rails 
guides 
http://guides.rubyonrails.org/action_mailer_basics.html#sending-email-with-name

I added this link to the stackoverflow question.  Generally, any question 
from 2009 should be ignored.

2.3.4 Sending Email With Name

Sometimes you wish to show the name of the person instead of just their 
email address when they receive the email. The trick to doing that is to 
format the email address in the format "Full Name <email>".
def welcome_email(user)
  @user = user
  email_with_name = %("#{@user.name}" <#{@user.email}>)
  mail(to: email_with_name, subject: 'Welcome to My Awesome Site')
end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to