Permalink
Browse files

Action Mailer guide update: the :to parameter now supports both Strin…

…g and Array values to indicate recipients.
  • Loading branch information...
1 parent ac4dc5e commit 169a50930f330f94c189b5fcd665a3d209ccbcfa @raul raul committed Aug 14, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/guides/source/action_mailer_basics.textile
@@ -242,11 +242,11 @@ end
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.
+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 list of emails can be an array of email addresses or a single string with the addresses separated with commas.
<ruby>
class AdminMailer < ActionMailer::Base
- default :to => Admin.all.map(&:email).join(", "),
+ default :to => Admin.all.map(&:email),
:from => "notification@example.com"
def new_registration(user)

0 comments on commit 169a509

Please sign in to comment.