2014-10-25 06:14:05 -04:00
|
|
|
* `config.force_ssl = true` will set
|
|
|
|
`config.action_mailer.default_url_options = { protocol: 'https' }`
|
|
|
|
|
|
|
|
*Andrew Kampjes*
|
|
|
|
|
2015-06-03 12:28:21 -04:00
|
|
|
* Add `config.action_mailer.deliver_later_queue_name` configuration to set the
|
|
|
|
mailer queue name.
|
|
|
|
|
|
|
|
*Chris McGrath*
|
|
|
|
|
2015-05-09 05:59:59 -04:00
|
|
|
* `assert_emails` in block form use the given number as expected value.
|
|
|
|
This makes the error message much easier to understand.
|
|
|
|
|
|
|
|
*Yuji Yaginuma*
|
|
|
|
|
2015-05-04 05:43:52 -04:00
|
|
|
* 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*
|
|
|
|
|
2015-02-26 09:29:01 -05:00
|
|
|
* Mailer preview now uses `url_for` to fix links to emails for apps running on
|
|
|
|
a subdirectory.
|
|
|
|
|
|
|
|
*Remo Mueller*
|
|
|
|
|
2015-04-27 04:15:52 -04:00
|
|
|
* Mailer previews no longer crash when the `mail` method wasn't called
|
|
|
|
(`NullMail`).
|
|
|
|
|
|
|
|
Fixes #19849.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2015-04-27 03:38:14 -04:00
|
|
|
* Make sure labels and values line up in mailer previews.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2015-01-08 09:41:22 -05:00
|
|
|
* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`.
|
|
|
|
|
2015-01-31 05:54:00 -05:00
|
|
|
Example:
|
|
|
|
|
2015-01-08 09:41:22 -05:00
|
|
|
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
|
|
|
|
end
|
|
|
|
|
|
|
|
*George Claghorn*
|
|
|
|
|
2015-01-07 04:44:56 -05:00
|
|
|
* Add `_mailer` suffix to mailers created via generator, following the same
|
|
|
|
naming convention used in controllers and jobs.
|
|
|
|
|
|
|
|
*Carlos Souza*
|
|
|
|
|
2015-01-03 15:17:16 -05:00
|
|
|
* Remove deprecate `*_path` helpers in email views.
|
|
|
|
|
|
|
|
*Rafael Mendonça França*
|
|
|
|
|
2015-01-02 21:01:01 -05:00
|
|
|
* Remove deprecated `deliver` and `deliver!` methods.
|
|
|
|
|
|
|
|
*claudiob*
|
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
* Template lookup now respects default locale and I18n fallbacks.
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
Given the following templates:
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
mailer/demo.html.erb
|
|
|
|
mailer/demo.en.html.erb
|
|
|
|
mailer/demo.pt.html.erb
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
Before this change, for a locale that doesn't have its associated file, the
|
|
|
|
`mailer/demo.html.erb` would be rendered even if `en` was the default locale.
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
Now `mailer/demo.en.html.erb` has precedence over the file without locale.
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
Also, it is possible to give a fallback.
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
mailer/demo.pt.html.erb
|
|
|
|
mailer/demo.pt-BR.html.erb
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given
|
|
|
|
the right I18n fallback configuration.
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-12-31 10:53:36 -05:00
|
|
|
*Rafael Mendonça França*
|
2014-12-29 21:46:55 -05:00
|
|
|
|
2014-11-28 12:00:06 -05:00
|
|
|
Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md) for previous changes.
|