From d016decb47b3bc1a9ab7f4e2f82cf54de1f23965 Mon Sep 17 00:00:00 2001 From: Aditya Sanghi Date: Fri, 7 Sep 2012 01:47:27 +0530 Subject: Dynamic Delivery Method Options --- guides/source/4_0_release_notes.textile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/guides/source/4_0_release_notes.textile b/guides/source/4_0_release_notes.textile index 0e03779e0d..fc922b04b7 100644 --- a/guides/source/4_0_release_notes.textile +++ b/guides/source/4_0_release_notes.textile @@ -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 :delivery_method_options key on mail. + + +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 + + h3. Action Pack h4. Action Controller -- cgit v1.2.3