aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Allow call `assert_enqueued_with` and `assert_enqueued_email_with` with no blockbogdanvlviv2018-06-291-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Example of `assert_enqueued_with` with no block ```ruby def test_assert_enqueued_with MyJob.perform_later(1,2,3) assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low') MyJob.set(wait_until: Date.tomorrow.noon).perform_later assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon) end ``` Example of `assert_enqueued_email_with` with no block: ```ruby def test_email ContactMailer.welcome.deliver_later assert_enqueued_email_with ContactMailer, :welcome end def test_email_with_arguments ContactMailer.welcome("Hello", "Goodbye").deliver_later assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] end ``` Related to #33243
* ActionMailer::Base can unregister observer(s) and interceptor(s). (#32207)Kota Miyake2018-05-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | * ActionMailer::Base can unregister observer(s) and interceptor(s). One or multiple mail observers can be unregistered using `ActionMailer::Base.unregister_observers` or `ActionMailer::Base.unregister_observer`. One or multiple mail interceptors can be unregistered using `ActionMailer::Base.unregister_interceptors` or `ActionMailer::Base.unregister_interceptor`. For preview interceptors, it's possible to use `ActionMailer::Base.unregister_preview_interceptors` or `ActionMailer::Base.unregister_preview_interceptor`. * Ensure to be reset registered observer(s) and interceptor(s) * Add explanation to CHANGELOG * Add original author's name [Kota Miyake + Rafael Mendonça França + Claudio Ortolina]
* Eager autoload mail gem when eager load is true (#32808)Samuel Cochran2018-05-231-0/+4
| | | | | | | | | | | | | | | | | | | | * Eager autoload mail gem when eager load is true We had a production issue where our Sidekiq worker threads all became deadlocked while autoloading a file within the mail gem, required via ActionMailer, despite setting our Rails applicaiton to eager load. `Mail.eager_autoload!` exists and works great, ActionMailer just doesn't call it during eager loading. Adding it to the ActionMailer Railtie's eager_load_namespaces takes care of calling `Mail.eager_autoload!` during the `eager_load!` initializer. * 'Mail' isn't defined yet, use before_eager_load instead * Make sure mail is loaded * Move eager load of Mail into ActionMailer.eager_load! [Samuel Cochran + Rafael Mendonça França]
* Merge pull request #32231 from gmcgibbon/perform_email_jobs_in_assert_emailsRafael Mendonça França2018-03-131-1/+3
| | | | Perform email jobs in #assert_emails
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-0/+5
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Start Rails 6.0 development!!!Rafael Mendonça França2018-01-301-31/+1
| | | | :tada::tada::tada:
* Merge pull request #30391 from jbourassa/fix-actionmailer-lambda-defaultRyuta Kamizono2018-01-241-0/+6
|\ | | | | | | Fix actionmailer lambda default
| * Fix AM::Base.default proc arity breaking changeJimmy Bourassa2017-08-291-0/+5
| | | | | | | | | | | | | | PR #29270 changed the number of arguments that gets passed to Procs defined in ActionMail::Base.default. With this changeset, Procs can now have 1 or 0 arguments Also adds test coverage for AM::Base.default Proc arity.
* | Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-281-0/+5
| |
* | Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-271-0/+2
| |
* | Cleanup CHANGELOGs [ci skip]Ryuta Kamizono2017-10-041-1/+1
| | | | | | | | | | | | | | | | | | * Add missing credit * Add backticks * Fix indentation * Remove trailing spaces And some minor tweaks.
* | Add assert_enqueued_email_with to ActionMailer::TestHelperMikkel Malmberg2017-09-271-0/+8
|/
* Fix indentation [ci skip]Ryuta Kamizono2017-06-151-6/+7
|
* Allow mailers to configure their delivery jobMatthew Mongeau2017-06-151-0/+10
| | | | | | | | | | | Setting delivery_job on a mailer class will cause MessageDelivery to use the specified job instead of ActionMailer::DeliveryJob: class MyMailer < ApplicationMailer self.delivery_job = MyCustomDeliveryJob ... end
* Start Rails 5.2 developmentMatthew Draper2017-03-221-33/+1
|
* Preparing for 5.1.0.beta1 releaseRafael Mendonça França2017-02-231-0/+2
|
* Add backticks around constantJon Moss2017-02-211-1/+1
| | | | [ci skip]
* Add `:args` to `process.action_mailer` eventyuuji.yaginuma2017-02-041-0/+4
|
* Offer the option to use parameterization for shared processing of headers ↵David Heinemeier Hansson2017-01-281-0/+9
| | | | | and ivars (#27825) Offer the option to use parameterization for shared processing of headers and ivars
* Merge pull request #27227 from MQuy/allow-custom-content-type-in-mail-bodyRafael Mendonça França2017-01-061-0/+12
|\ | | | | | | Allow to custom content type when setting mailer body
| * Add changelog for custom content typeMQuy2016-12-011-0/+12
|/
* Action Mailer: Declarative exception handling with `rescue_from`.Jeremy Daer2016-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Follows the same pattern as controllers and jobs. Exceptions raised in delivery jobs (enqueued by `#deliver_later`) are also delegated to the mailer's rescue_from handlers, so you can handle the DeserializationError raised by delivery jobs: ```ruby class MyMailer < ApplicationMailer rescue_from ActiveJob::DeserializationError do … end ``` ActiveSupport::Rescuable polish: * Add the `rescue_with_handler` class method so exceptions may be handled at the class level without requiring an instance. * Rationalize `exception.cause` handling. If no handler matches the exception, fall back to the handler that matches its cause. * Handle exceptions raised elsewhere. Pass `object: …` to execute the `rescue_from` handler (e.g. a method call or a block to instance_exec) against a different object. Defaults to `self`.
* Start Rails 5.1 development :tada:Rafael Mendonça França2016-05-101-140/+1
|
* Preparing for 5.0.0.rc1 releaseRafael Mendonça França2016-05-061-0/+5
|
* Prep Rails 5 beta 4eileencodes2016-04-271-0/+2
|
* Pass over AM changelogVipul A M2016-04-101-4/+3
| | | | | | | | - Fixed statement about setting `config.action_mailer.default_url_options = {protocol: 'https'}` . We are just setting the protocol key to 'https', not replacing/initializing the complete config. - Fixed grammar in assert_emails changlog - Added sentence separator for code ":" [ci skip]
* Disallow calling `#deliver_later` after local message modifications.Jeremy Daer2016-04-071-0/+18
| | | | | | | | | | | | | | | | | | | They would be lost when the delivery job is enqueued, otherwise. Prevents a common, hard-to-find bug like: ```ruby message = Notifier.welcome(user, foo) message.message_id = my_generated_message_id message.deliver_later ``` The message_id is silently lost here! *Only the mailer arguments are passed to the delivery job.* This raises an exception now. Make modifications to the message within the mailer method or use a custom Active Job to manage delivery instead of using #deliver_later.
* Sendmail default arguments match Mail::SendMailarktisklada2016-04-051-0/+6
| | | | Removes `-t`
* Pass over CHANGELOGs [ci skip]Prathamesh Sonpatki2016-03-301-3/+1
|
* Preparing for 5.0.0.beta3 releaseeileencodes2016-02-241-0/+2
| | | | Adds changelog headers for beta3 release
* Add changelog entry for #22825Rafael Mendonça França2016-02-241-0/+6
|
* reset `ActionMailer::Base.deliveries` in `ActionDispatch::IntegrationTest`.Yves Senn2016-02-161-0/+6
| | | | | | | | | Whenever you are sending emails in integration tests using the `:test` delivery method you need to make sure that `ActionMailer::Base.deliveries` is reset after every test. This piece of boilerplate code is present in all my applications that send emails. Let's have `ActionDispatch::IntegrationTest` reset the deliveries automatically.
* Preparing for Rails 5.0.0.beta2Sean Griffin2016-02-011-0/+5
|
* release notes, extract notable changes from Action Mailer CHANGELOG.Yves Senn2015-12-221-2/+2
| | | | [ci skip]
* No more no changes entries in the CHANGELOGsGenadi Samokovarov2015-12-211-3/+0
| | | | | | | | | | | | | | During the `5.0.0.beta1` release, the CHANGELOGs got an entry like the following: ``` * No changes. ``` It is kinda confusing as there are indeed changes after it. Not a biggie, just a small pass over the CHANGELOGs. [ci skip]
* Add CHANGELOG headers for Rails 5.0.0.beta1eileencodes2015-12-181-0/+5
|
* Revert "Merge pull request #18446 from ↵Sean Griffin2015-11-231-7/+0
| | | | | | | | | cloud8421/actionmailer-unregister-interceptor" This reverts commit 65a61ab7c370d2894c11ce276725f723a5c9c111, reversing changes made to 14314ca18302f18c3d8bb7a63e9f71ac4c2290c2. This PR broke the build
* Merge pull request #18446 from cloud8421/actionmailer-unregister-interceptorSean Griffin2015-11-231-0/+7
|\ | | | | | | ActionMailer::Base can unregister interceptor(s).
| * ActionMailer::Base can unregister interceptor(s).Claudio Ortolina2015-01-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | One or multiple mail interceptors can be unregistered using `ActionMailer::Base.unregister_interceptors` or `ActionMailer::Base.unregister_interceptor`. For preview interceptors, it's possible to use `ActionMailer::Base.unregister_preview_interceptors` or `ActionMailer::Base.unregister_preview_interceptor`. Refactors logic to constantize a string/symbol into separate method.
* | ActionMailer https on URL with force_ssl = trueAndrew Kampjes2015-08-141-0/+5
| | | | | | | | | | | | | | | | | | | | `config.force_ssl = true` will set config.action_mailer.default_url_options = { protocol: 'https' } If you have turned on force_ssl, and then gone to the effort of setting config.action_mailer.default_url_options = {host: 'example.com'} then you are probably pointing people back to your current app and want https on that too.
* | Revert "Merge pull request #20758 from ↵Kasper Timm Hansen2015-07-071-6/+0
| | | | | | | | | | | | | | xijo/action_mailer_message_delivery_respects_i18n_locale" This reverts commit f2a8c23654d69dd8f294971487b5abf0e5d891c3, reversing changes made to 3046c9bbe154aa717a5147091be8b495ed8969c4.
* | ActionMailer::MessageDelivery respects current I18n.localeJohannes Opper2015-07-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When #deliver_now is called all translations within the generated email will be looked up for the current I18n locale. I18n.locale = ‘de’ mail.deliver_now # Generates german email, correct In #enqueue_delivery the locale was not considered and the resulting job uses the default locale. I18n.locale = ‘de’ mail.deliver_later # Generate english email, incorrect In order to achieve a consistent behaviour the current locale is now always passed to `ActionMailer::DeliveryJob`.
* | Document config.action_mailer.deliver_later_queue_nameRafael Mendonça França2015-06-031-0/+5
| | | | | | | | | | | | Also add a CHANGELOG entry for #18587 [ci skip]
* | `assert_emails` in block form use the given number as expected valueyuuji.yaginuma2015-05-091-0/+5
| |
* | Add support for inline images to mailer previewsAndrew White2015-05-041-0/+5
| | | | | | | | | | Use a preview interceptor to search for inline cid: urls in src attributes and convert them to data urls.
* | Mailer preview now uses `url_for` to fix links to emails for apps running on ↵Remo Mueller2015-04-301-0/+5
| | | | | | | | a subdirectory, closes #19092.
* | mailer previews for `NullMail` instances. Closes #19849.Yves Senn2015-04-281-0/+7
| |
* | mailer previews, make sure labels and values line up.Yves Senn2015-04-281-0/+4
| | | | | | | | | | | | While this was true before when every `dd` had a value, this patch makes sure that everything keeps lining up even when the `dd` node is blank.
* | unify CHANGELOG format. [ci skip]Yves Senn2015-01-311-0/+2
|/
* Add assert_enqueued_emails and assert_no_enqueued_emailsGeorge Claghorn2015-01-081-0/+17
|