aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the ability to intercept emails before previewingAndrew White2014-01-261-3/+42
| | | | | | | | | | | | | | | | To support the ability for tools like CSS style inliners to operate on emails being previewed this commit adds a hook in a similar fashion to the existing delivery interceptor hook, e.g: class CSSInlineStyler def self.previewing_email(message) # inline CSS styles end end ActionMailer::Base.register_preview_interceptor CSSInlineStyler Fixes #13622.
* `mail()` without arguments is a getter for the current mail.Yves Senn2013-12-021-0/+21
| | | | | | | | | | | | | | This behavior is documented in our guides (http://edgeguides.rubyonrails.org/action_mailer_basics.html#action-mailer-callbacks) but was broken in the past. This commit short curcuits the `mail` method if: 1. mail() was previously called 2. no headers are passed 3. no block is passed Closes #13090. /cc @pixeltrix
* don't convert mailer default values to procsAlex Tsukernik2013-07-221-0/+4
| | | | | | Invoke mailer defaults as procs only if they are procs, do not convert with to_proc. That an object is convertible to a proc does not mean it's meant to be always used as a proc. Fixes #11533
* Allow passing interpolations to `#default_i18n_subject`, e.g.:Olek Janiszewski2013-01-241-0/+6
| | | | | | | | | | | | | | | # config/locales/en.yml en: user_mailer: welcome: subject: 'Hello, %{username}' # app/mailers/user_mailer.rb class UserMailer < ActionMailer::Base def welcome(user) mail(subject: default_i18n_subject(username: user.name)) end end
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-211-13/+0
| | | | with Rails 4.0.
* Merge pull request #8450 from senny/8448_mailer_return_valuesRafael Mendonça França2012-12-101-0/+6
|\ | | | | the return value of mailer methods should not be relevant
| * The return value from mailer methods is not relevant.Yves Senn2012-12-101-0/+6
| |
* | use _action callbacks in actionmailerFrancesco Rodriguez2012-12-081-10/+10
|/
* Explicit multipart messages respect :parts_orderNate Berkopec2012-11-191-21/+21
| | | | | | | | | As issue #7978, the order in which ActionMailer sends multipart messages could be unintentionally overwritten if a block is passed to the mail method. This changes the mail method such that :parts_order is always respected, regardless of whether a block is passed to mail.
* Revert "Support `Mailer.deliver_foo(*args)` as a synonym for ↵Jon Leighton2012-10-301-7/+0
| | | | | | | | | | | | `Mailer.foo(*args).deliver`." This reverts commit 7e0cf563639bc7508da381b1b8321c7a89be1aa8. Conflicts: actionmailer/CHANGELOG.md See discussion at https://github.com/rails/rails/commit/7e0cf563639bc7508da381b1b8321c7a89be1aa8#commitcomment-2075489
* Do not render views when mail() isn't called. (NullMail refactoring)Yves Senn2012-10-281-0/+6
|
* Update actionmailer with new hash syntax.Kirill Nikitin2012-10-071-32/+32
|
* Support `Mailer.deliver_foo(*args)` as a synonym for ↵Jon Leighton2012-09-281-0/+7
| | | | | | | `Mailer.foo(*args).deliver`. This makes it easy to write e.g. `Mailer.expects(:deliver_foo)` when testing code that calls the mailer.
* Use synchronous queue by default. Separate queued message delivery jobs from ↵Jeremy Kemper2012-09-161-16/+7
| | | | the queued message wrappers so the queue itself needn't be marshaled (due to queue reference QueuedMessage).
* Move queue classes to ActiveSupportSantiago Pastorino2012-09-141-2/+2
|
* Action Mailer async flag is true by default using a Synchronous implSantiago Pastorino2012-09-111-3/+3
|
* Added missing require. When performing rake test:isolated, test/base_test.rb ↵kennyj2012-08-291-0/+1
| | | | was break.
* Fix ActionMailer tests that depend on run orderFrancesco Rodriguez2012-08-231-5/+9
|
* Fix failing AM test due to missing templateCarlos Antonio da Silva2012-07-061-1/+1
|
* Introduce config.action_mailer.default_from=Robert Pankowecki2012-07-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Allows to easily set :from, :replay_to, etc. options in config/application.rb using simple syntax: config.action_mailer.default_options = {from:"no-replay@example.org"} This was not possible using #default method because config.action_mailer.default(from: "no-replay@example.org") is interpreated as reader method and just returns nil. It would not call ActionMailer::Base.default method. The only way of calling this method from config/application.rb was to use the direct syntax which looks ugly in my opinion: config.assets.enabled = false config.assets.version = '1.0' config.encoding = "utf-8" config.action_mailer.default_url_options= { host:"example.org", protocol:"https" } ActionMailer::Base.default(from: "no-replay@example.org")
* Some final syntax fixesBrian Cardarella2012-06-241-2/+1
|
* Forcing the message sending is no longer necessaryBrian Cardarella2012-06-241-9/+0
|
* Support for custom queues on the mailerBrian Cardarella2012-06-231-5/+16
| | | | Credit goes to *Aaron Patterson* (tenderlove)
* Force message delivery despite asyncBrian Cardarella2012-06-231-0/+8
|
* Asynchronous ActionMailerBrian Cardarella2012-06-231-0/+14
| | | | | | | | Any ActionMailer class can be set to render and delier messages using the new Rails Queue. Some of this work was borrowed (with permission) from Nick Plante's (zapnap) reqsue_mailer gem.
* raise an error if no implicit mailer template could be foundDamien Mathieu2012-06-201-0/+7
|
* mailer can be anonymousSergey Nartimov2012-05-131-0/+13
| | | | closes #5970
* Add ability to define callbacks in ActionMailer using ↵Justin S. Leitgeb2012-03-111-0/+46
| | | | | | | | | | | | | | | | | AbstractController::Callbacks. Prior to this commit, there isn't a good way of adding things like default inline attachments to an email. This Stack Overflow thread shows people using hooks like the 'default' method in ActionMailer::Base to call a Proc for message configuration: http://stackoverflow.com/questions/5113121/rails-use-same-attachment-for-all-emails-using-layout This has the unintended side effect of setting a message header, so it's not a good solution. This pull request adds support for message modifications by including AbstractController:Callbacks in ActionMailer::Base. It includes tests and documentation for the functionality provided by including this module.
* Fix broken testsSantiago Pastorino2012-03-101-0/+2
|
* Fix actionmailer tests broken by #4751a69Justin S. Leitgeb2012-03-101-1/+1
|
* remove checks for encodings availabilitySergey Nartimov2011-12-251-2/+2
|
* remove AM delegating register_observer and register_interceptor to Mail and ↵Josh Kalderimis2011-04-041-0/+40
| | | | | | instead implement smarter versions allowing for string class names, also added proper Railtie support with tests. Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed indentation in actionmailer base_test [#6538 state:committed]Dalibor Nasevic2011-03-071-2/+2
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* No need of instance variableDalibor Nasevic2011-03-021-3/+3
| | | | | | [#6502 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Deprecate the old mailer API that was not deprecated yet.José Valim2010-08-291-3/+0
|
* Ensure templates like template.html are found but still uses the proper ↵José Valim2010-08-261-0/+6
| | | | virtual path.
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-8/+8
| | | | 's/[ \t]*$//' -i {} \;)
* Reload action_methods in AbstractController after defining new method.Piotr Sarnacki2010-08-041-0/+12
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move config_accessor :asset_host from ActionController::Base to ↵Jeroen van Dijk and Josh Kalderimis2010-07-241-129/+27
| | | | | | | | AbstractController which fixes issues with asset_host in ActionMailer Including: - Moved mailer objects in separate directory - Added two tests for asset_host configuration option
* Time has it own implementation of xmlschema, now AMo doesn't depend on TZInfoSantiago Pastorino2010-07-021-0/+1
| | | | | | [#4979 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* subject is automatically looked up on I18n using mailer_name and action_name ↵José Valim2010-06-121-1/+1
| | | | as scope as in t('.subject')
* Adding inline attachment support to ActionMailerMikel Lindsaar2010-06-071-0/+17
|
* Use better assertion methods for testingNeeraj Singh2010-05-191-2/+2
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Adding ability for the procs to be called within the instance, allows you to ↵Mikel Lindsaar2010-05-021-1/+14
| | | | | | pass results from instance methods to the mail header Signed-off-by: José Valim <jose.valim@gmail.com>
* Adding ability to pass proc's to the ActionMailer class default methodMikel Lindsaar2010-05-021-0/+17
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* template_name and template_path should not be added to mail headers.José Valim2010-04-131-5/+5
|
* Fixing up attachment encoding specs to work with latest mail - and be correctMikel Lindsaar2010-03-281-2/+18
|
* Mail now correctly bundles up the charset into the content type fieldMikel Lindsaar2010-03-281-7/+7
|
* Improve performance of the rendering stack by freezing formats as a sign ↵José Valim2010-03-191-22/+36
| | | | that they shouldn't be further modified.
* Finish cleaning up rendering stack from views and move assigns evaluation to ↵José Valim2010-03-121-0/+2
| | | | controller (so plugins and/or controllers can overwrite just one method).