aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
Commit message (Collapse)AuthorAgeFilesLines
* Rename remaining :in / :at to :wait / :wait_untilCristian Bica2014-09-041-12/+9
|
* Active Job refactoringCristian Bica2014-09-031-9/+4
|
* [ci skip] Fix a typo in the doc of MessageDeliveryyuuji.yaginuma2014-09-021-3/+3
|
* Refer to the library name instead of the constantRobin Dupret2014-08-301-1/+1
| | | | | | | | | When we are loading a component and we want to know its version, we are actually not speaking about the constant but the library itself. [ci skip] [Godfrey Chan & Xavier Noria]
* Merge branch 'master' of github.com:rails/railsDavid Heinemeier Hansson2014-08-295-30/+109
|\
| * Merge pull request #16598 from seuros/masterMatthew Draper2014-08-231-0/+1
| |\ | | | | | | [ActionMailer] require activejob railtie
| | * [ActionMailer] require activejob railtieAbdelkader Boudih2014-08-221-0/+1
| | |
| * | applies API guidelines to new AM docsXavier Noria2014-08-212-32/+32
| |/
| * [Rdoc] Make clear that we are sending an AR object [ci skip]Abdelkader Boudih2014-08-202-16/+16
| |
| * Fix typo in rdoc [ci skip]Abdelkader Boudih2014-08-202-16/+16
| |
| * Updated rdoc / guides / release notes related to ActiveJob / ActionMailerCristian Bica2014-08-204-34/+92
| |
| * Deprecated .deliver / .deliver! to .deliver_now / .deliver_now!Cristian Bica2014-08-201-2/+22
| |
* | Preparing for 4.2.0.beta1 releaseDavid Heinemeier Hansson2014-08-191-1/+1
|/
* Add `set_delivery_method` and `restore_delivery_method` to ↵Lucas Mazza2014-08-191-0/+9
| | | | | | | | `ActionMailer::TestCase`. This way these methods are available outside the ActionMailer test suite, but they are still duplicated inside `test/abstract_unit` for test cases that don't inherit from the `ActionMailer::TestCase` class.
* Merge branch 'master' into loofahRafael Mendonça França2014-08-174-2/+64
|\ | | | | | | | | Conflicts: actionpack/CHANGELOG.md
| * [ActionMailer] Rename ActionMailer::DelayedDeliveryJob to ↵Abdelkader Boudih2014-08-172-3/+5
| | | | | | | | ActionMailer::DeliveryJob
| * Fixed indentationCristian Bica2014-08-161-1/+1
| |
| * Removed method missing from ActionMailer::MessageDeliveryCristian Bica2014-08-152-4/+4
| |
| * Refactor DeliverLater into MessageDeliveryAbdelkader Boudih2014-08-146-72/+60
| |
| * Make ActionMailer::Previews methods class methods.Abdelkader Boudih2014-08-141-0/+2
| |
| * Added ActionMailer::DeliverLaterAbdelkader Boudih2014-08-134-1/+71
| |
* | Merge branch 'master' into loofahRafael Mendonça França2014-08-123-14/+36
|\| | | | | | | | | | | | | Conflicts: actionpack/CHANGELOG.md actionpack/test/controller/integration_test.rb actionview/CHANGELOG.md
| * Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-302-1/+6
| | | | | | | | | | | | | | | | | | | | | | Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead. Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR. Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead. The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`. Paired @sgrif & @schneems
| * Raise an exception when attachments are added after `mail` was called.Yves Senn2014-07-291-1/+16
| | | | | | | | | | | | | | | | | | Closes #16163 Adding attachments after a call to `mail` will result in invalid emails. This is related to the fact, that `mail` is making the required preparations before the email is ready to be sent. These change depending on your added attachments.
| * Prefer to pass block when logging.Guo Xiang Tan2014-07-181-11/+13
| | | | | | | | | | | | | | | | The Logger by default includes a guard which checks for the logging level. By removing the custom logging guards, we can decouple the logging guard from the logging action to be done. This also follows the good practice listed on http://guides.rubyonrails.org/debugging_rails_applications.html#impact-of-logs-on-performance.
| * Fix typos like `a html` to `an html` and 'an mail' to 'an email'. [ci skip]Santosh Wadghule2014-07-141-1/+1
| |
* | Include the selector assertions on the test caseRafael Mendonça França2014-07-151-0/+2
| | | | | | | | | | We don't need to require users to include this module on ActionMailer::TestCase
* | Merge pull request #11218 from kaspth/loofah-integrationRafael Mendonça França2014-07-101-3/+2
|\ \ | |/ |/| | | | | | | | | | | Loofah-integration Conflicts: actionpack/CHANGELOG.md actionview/CHANGELOG.md
| * Restore delivery method on teardowns.Timm2014-06-161-3/+2
| |
* | Rename preview_enabled option to show_previewsRafael Mendonça França2014-07-012-7/+7
| |
* | Add configuration to enable mail previewsLeonard Garvey2014-07-012-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds `config.action_mailer.preview_enabled` This allows mail previewing to be enabled easily in non-development environments such as staging. The default is set to true for development so no changes should be required to existing Rails applications. The mail preview path can still be configured using the existing `config.action_mailer.preview_path` configuration option. Adding this avoids devs from having to do stuff like: https://gist.github.com/lengarvey/fa2c9bd6cdbeba96526a Update actionmailer/CHANGELOG with new configuration. Update configuring guide with new configuratation. Add `config.action_mailer.preview_path` to configuring guide.
* | Merge pull request #15815 from DNNX/mail-helper-refactoringRafael Mendonça França2014-06-191-2/+2
|\ \ | | | | | | Remove unused block parameter from #gsub call in AM::MailHelper#block_format
| * | Remove unused block parameter from #gsub call in AM::MailHelper#block_formatViktar Basharymau2014-06-191-2/+2
| | |
* | | Add `logger.debug?` guard to `ActionMailer::LogSubscriber#process`Viktar Basharymau2014-06-191-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *TLDR*: The method is 4 times faster when log level is higher than DEBUG. Also, the other two methods, `#deliver` and `#receive` have similar guard statements, so this commit adds some symmetry to the code. This is probably not the most critical part of ActionMailer in terms of performance, but here are some benchmarks: ``` require 'benchmark/ips' require 'action_mailer' event = ActiveSupport::Notifications::Event.new( 'process.action_mailer', Time.now, Time.now, 'bf4e2b36ce085fd35b24', { mailer: "UserMailer", action: :welcome } ) ActionMailer::Base.logger = ActiveSupport::Logger.new '/dev/null' subscriber = ActionMailer::LogSubscriber.new def subscriber.process_with_guard(event) return unless logger.debug? mailer = event.payload[:mailer] action = event.payload[:action] debug("\n#{mailer}##{action}: processed outbound mail in #{event.duration.round(1)}ms") end Benchmark.ips do |r| ActionMailer::Base.logger.level = ::Logger::Severity::INFO r.report('no guard') { subscriber.process(event) } r.report(' guard') { subscriber.process_with_guard(event) } end __END__ Calculating ------------------------------------- no guard 9640 i/100ms guard 38381 i/100ms ------------------------------------------------- no guard 169166.9 (±10.2%) i/s - 838680 in 5.007262s guard 728184.9 (±9.6%) i/s - 3607814 in 4.999218s ``` When log level is DEBUG, the _guarded_ method is a bit slower. This is a good tradeoff for 4x improvement in production mode. ``` Benchmark.ips do |r| ActionMailer::Base.logger.level = ::Logger::Severity::DEBUG r.report('no guard') { subscriber.process(event) } r.report(' guard') { subscriber.process_with_guard(event) } end __END__ Calculating ------------------------------------- no guard 4970 i/100ms guard 4564 i/100ms ------------------------------------------------- no guard 55617.4 (±3.5%) i/s - 278320 in 5.010523s guard 49452.1 (±5.6%) i/s - 251020 in 5.093358s ```
* | allow preview interceptors to be registered through `config.action_mailer`.Yves Senn2014-06-152-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was partially broken because `preview_interceptors=` just assigned the raw values, whithout going through `register_preview_interceptor`. Now the Action Mailer railtie takes care of the `preview_interceptors` option. This commit is a partial revert of: Revert "Merge pull request #15739 from y-yagi/correct_doc_for_action_mailer_base" This reverts commit a15704d7f35f17d34d0118546799141d6f853656, reversing changes made to 1bd12a8609d275ad75fcc4b622ca4f5b32dc76be. /cc @kuldeepaggarwal @y-yagi
* | [ci skip] correct doc for `register_preview_interceptor`yuuji.yaginuma2014-06-151-1/+1
|/
* [ci skip] Improve enable_starttls_auto documentation.Juanito Fatas2014-06-111-2/+2
|
* Restore test deliveries properly in ActionMailer.Zuhao Wan2014-06-071-0/+8
| | | | | | | | | | | `ActionMailer::Base.delivery_method` and `ActionMailer::Base.perform_deliveries` have leaked states. "delivery method can be customized per instance" and "delivery method can be customized in subclasses not changing the parent" in delivery_methods_test.rb will fail if test_helper_test.rb (in which TestHelperMailerTest is inherited from ActionMailer::TestCase) runs before it.
* Pass through AM documentation re: 02d048d [ci skip]Zachary Scott2014-05-262-5/+7
|
* Use "Action Mailer" as canonical name in documentation [ci skip]Zachary Scott2014-05-261-1/+1
| | | | | See also: https://github.com/rails/rails/commit/3a297f8db75b172882bb3c2f9440d0c7365b8b11#commitcomment-6451708
* Add description of ActionMailer::TestHelper module [ci skip]Zachary Scott2014-05-261-0/+2
|
* [ci skip] Improve formatting and ymlGaurav Sharma2014-04-241-2/+2
|
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-03-071-1/+1
|\ | | | | | | | | Conflicts: guides/source/4_1_release_notes.md
| * :scissors:Zachary Scott2014-02-231-1/+1
| | | | | | | | This commit also addresses rails/docrails#169 and rails/rails#14159
* | Introduce `Rails.gem_version`Prem Sichanugrist2014-03-052-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method return `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform version comparison. Example: Rails.version #=> "4.1.2" Rails.gem_version #=> #<Gem::Version "4.1.2"> Rails.version > "4.1.10" #=> false Rails.gem_version > Gem::Version.new("4.1.10") #=> true Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true This was originally introduced as `.version` by @charliesome in #8501 but got reverted in #10002 since it was not backward compatible. Also, updating template for `rake update_versions`.
* | update version to 4.2.0.alphaYves Senn2014-02-231-1/+1
|/
* Fix render plain docs example in AM::BaseGuillermo Iguaran2014-02-181-2/+2
| | | The errors were introduced in e220a34e39
* Update Docs in favor to use render plain instead of text optionrobertomiranda2014-02-181-3/+3
| | | | ref #14062
* Merge branch '4-1-0-beta2'Rafael Mendonça França2014-02-181-1/+1
|\ | | | | | | | | | | Conflicts: actionview/CHANGELOG.md activerecord/CHANGELOG.md
| * Preparing for 4.1.0.beta2 releaseRafael Mendonça França2014-02-181-1/+1
| |