- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
- No changes.
-
Exception handling: use
rescue_fromto handle exceptions raised by mailer actions, by message delivery, and by deferred delivery jobs.Jeremy Daer
-
Disallow calling
#deliver_laterafter making local modifications to the message which would be lost when the delivery job is enqueued.Prevents a common, hard-to-find bug like:
message = Notifier.welcome(user, foo) message.message_id = my_generated_message_id message.deliver_laterThe message_id is silently lost! Only the mailer arguments are passed to the delivery job.
This raises an exception now. Make modifications to the message within the mailer method instead, or use a custom Active Job to manage delivery instead of using #deliver_later.
Jeremy Daer
-
Removes
-tfrom default Sendmail arguments to match the underlyingMail::Sendmailsetting.Clayton Liggitt
-
Add support for fragment caching in Action Mailer views.
Stan Lo
-
Reset
ActionMailer::Base.deliveriesafter every test inActionDispatch::IntegrationTest.Yves Senn
-
config.action_mailer.default_url_options[:protocol]is now set tohttpsifconfig.force_sslis set totrue.Andrew Kampjes
-
Add
config.action_mailer.deliver_later_queue_nameconfiguration to set the mailer queue name.Chris McGrath
-
assert_emailsin block form, uses the given number as expected value. This makes the error message much easier to understand.Yuji Yaginuma
-
Add support for inline images in mailer previews by using an interceptor class to convert cid: urls in image src attributes to data urls.
Andrew White
-
Mailer preview now uses
url_forto fix links to emails for apps running on a subdirectory.Remo Mueller
-
Mailer previews no longer crash when the
mailmethod wasn't called (NullMail).Fixes #19849.
Yves Senn
-
Make sure labels and values line up in mailer previews.
Yves Senn
-
Add
assert_enqueued_emailsandassert_no_enqueued_emails.Example:
def test_emails assert_enqueued_emails 2 do ContactMailer.welcome.deliver_later ContactMailer.welcome.deliver_later end end def test_no_emails assert_no_enqueued_emails do # No emails enqueued here end endGeorge Claghorn
-
Add
_mailersuffix to mailers created via generator, following the same naming convention used in controllers and jobs.Carlos Souza
-
Remove deprecated
*_pathhelpers in email views.Rafael Mendonça França
-
Remove deprecated
deliveranddeliver!methods.claudiob
-
Template lookup now respects default locale and I18n fallbacks.
Given the following templates:
mailer/demo.html.erb mailer/demo.en.html.erb mailer/demo.pt.html.erbBefore this change, for a locale that doesn't have its associated file, the
mailer/demo.html.erbwould be rendered even ifenwas the default locale.Now
mailer/demo.en.html.erbhas precedence over the file without locale.Also, it is possible to give a fallback.
mailer/demo.pt.html.erb mailer/demo.pt-BR.html.erbSo if the locale is
pt-PT,mailer/demo.pt.html.erbwill be rendered given the right I18n fallback configuration.Rafael Mendonça França
Please check 4-2-stable for previous changes.