mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Dynamic Delivery Method Options
This commit is contained in:
parent
150c6dc30f
commit
d016decb47
1 changed files with 14 additions and 0 deletions
|
@ -116,6 +116,20 @@ h3. Action Mailer
|
|||
|
||||
* Asynchronously send messages via the Rails Queue.
|
||||
|
||||
* Delivery Options (such as SMTP Settings) can now be set dynamically per mailer action.
|
||||
|
||||
Delivery options are set via <tt>:delivery_method_options</tt> key on mail.
|
||||
|
||||
<ruby>
|
||||
def welcome_mailer(user,company)
|
||||
mail to: user.email,
|
||||
subject: "Welcome!",
|
||||
delivery_method_options: {user_name: company.smtp_user,
|
||||
password: company.smtp_password,
|
||||
address: company.smtp_server}
|
||||
end
|
||||
</ruby>
|
||||
|
||||
h3. Action Pack
|
||||
|
||||
h4. Action Controller
|
||||
|
|
Loading…
Reference in a new issue