diff options
author | Aditya Sanghi <asanghi@me.com> | 2010-09-25 15:04:25 +0530 |
---|---|---|
committer | Aditya Sanghi <asanghi@me.com> | 2010-09-25 15:04:25 +0530 |
commit | de880302bdee5453ab83373f27ac6d33a9066c54 (patch) | |
tree | 68e9430d9ca6526b5195e97a075a949e20f47b9c /railties/guides/source | |
parent | db8b3e71dc30e326a665f3b9d5c70473b8f08fa4 (diff) | |
download | rails-de880302bdee5453ab83373f27ac6d33a9066c54.tar.gz rails-de880302bdee5453ab83373f27ac6d33a9066c54.tar.bz2 rails-de880302bdee5453ab83373f27ac6d33a9066c54.zip |
review comments
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/action_mailer_basics.textile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile index 35372d5429..ac9052786e 100644 --- a/railties/guides/source/action_mailer_basics.textile +++ b/railties/guides/source/action_mailer_basics.textile @@ -242,13 +242,13 @@ end :class => 'photos' %> </erb> -h5. Sending email to multiple recipients +h5. Sending Email To Multiple Recipients It is possible to send email to one or more recipients in one email (for e.g. informing all admins of a new signup) by setting the list of emails to the <tt>:to</tt> key. The <tt>to:</tt> key however expects a string so you have join the list of recipients using a comma. <ruby> Class AdminMailer < ActionMailer::Base - default :to => Admin.all.map{|admin| admin.email}.join(", "), + default :to => Admin.all.map(&:email).join(", "), :from => "notification@example.com" def new_registration(user) @@ -258,7 +258,7 @@ It is possible to send email to one or more recipients in one email (for e.g. in end </ruby> -h5. Sending email with names +h5. 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 <tt>"Name <email>"</tt>. |