From 169a50930f330f94c189b5fcd665a3d209ccbcfa Mon Sep 17 00:00:00 2001 From: Raul Murciano Date: Sun, 14 Aug 2011 10:13:23 -0700 Subject: Action Mailer guide update: the :to parameter now supports both String and Array values to indicate recipients. --- railties/guides/source/action_mailer_basics.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile index 5b2212d9cb..4bf9161425 100644 --- a/railties/guides/source/action_mailer_basics.textile +++ b/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 :to key. The to: 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 :to key. The list of emails can be an array of email addresses or a single string with the addresses separated with commas. 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) -- cgit v1.2.3