mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
review comments
This commit is contained in:
parent
db8b3e71dc
commit
de880302bd
1 changed files with 3 additions and 3 deletions
|
@ -242,13 +242,13 @@ end
|
||||||
:class => 'photos' %>
|
:class => 'photos' %>
|
||||||
</erb>
|
</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.
|
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>
|
<ruby>
|
||||||
Class AdminMailer < ActionMailer::Base
|
Class AdminMailer < ActionMailer::Base
|
||||||
default :to => Admin.all.map{|admin| admin.email}.join(", "),
|
default :to => Admin.all.map(&:email).join(", "),
|
||||||
:from => "notification@example.com"
|
:from => "notification@example.com"
|
||||||
|
|
||||||
def new_registration(user)
|
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
|
end
|
||||||
</ruby>
|
</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
|
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>.
|
to format the email address in the format <tt>"Name <email>"</tt>.
|
||||||
|
|
Loading…
Reference in a new issue