Rails 4.2.0 (December 20, 2014)
MailerGeneratornow generates layouts by default. The HTML mailer layout now includes
<body>tags which improve the spam rating in some spam detection engines. Mailers now inherit from
ApplicationMailerwhich sets the default layout.
url_fornow generate URLs by default in templates. Passing
only_path: falseis no longer needed.
Fixes #16497 and #16589.
Xavier Noria, Richard Schneeman
Attachments can now be added while rendering the mail template.
#deliver_nowmethods and deprecate
#deliverin favor of
#deliver_laterwill enqueue a job to render and deliver the mail instead of delivering it immediately. The job is enqueued using the new Active Job framework in Rails and will use the queue that you have configured in Rails.
DHH, Abdelkader Boudih, Cristian Bica
ActionMailer::Previewsare now class methods instead of instance methods.
*_pathhelpers in email views. They generated broken links in email views and were not the intention of most developers. The
*_urlhelper is recommended instead.
Raise an exception when attachments are added after
This configuration option can be used to enable the mail preview in environments other than development (such as staging).
truein development and
Allow preview interceptors to be registered through
Please check 4-1-stable for previous changes.