Commit Graph

840 Commits

Author SHA1 Message Date
hnatt
1be276beb4 Rename ActionMailer::Base#class_from_value -> observer_class_for 2015-10-30 10:45:35 +02:00
hnatt
baaf3769ff Don't mutate headers in ActionMailer::Base#collect_responses_from_templates 2015-10-30 10:41:58 +02:00
hnatt
2a55a6d2e5 Pass message as argument to ActionMailer::Base#assign_headers_to_message 2015-10-30 08:56:00 +02:00
hnatt
c26abb8691 Fix indentation in ActionMailer::Base#collect_responses_from_templates 2015-10-29 22:01:16 +02:00
hnatt
4b65e5058e Refactor out headers to message assignment from ActionMailer::Base#mail 2015-10-29 21:58:27 +02:00
hnatt
79b6a4bbc4 Use attr_internal in ActionMailer::Base#mail instead of local var for message 2015-10-29 21:55:14 +02:00
hnatt
04f1ce7950 Refactor out defaults handling from ActionMailer::Base#mail 2015-10-29 21:52:04 +02:00
hnatt
8c566b9a94 Refactor ActionMailer::Base#collect_responses 2015-10-29 21:28:22 +02:00
hnatt
e71cfc109d Reduce code duplication in ActionMailer::Base#register_observer and #register_interceptor 2015-10-29 21:20:08 +02:00
Arthur Nogueira Neves
9674703671 Merge pull request #17388 from akampjes/master
ActionMailer https on URL with force_ssl = true
2015-10-12 14:26:11 -04:00
Sean Griffin
411ed20865 Merge pull request #21865 from Gaurav2728/test_cases_protected_method_nodoc
action mailer test cases protected method can be `# :nodoc:` [ci skip]
2015-10-04 17:23:47 -06:00
Gaurav Sharma
64e316edd3 action mailer test cases protected method can be # :nodoc: 2015-10-04 13:30:00 +05:30
amitkumarsuroliya
367e8cf763 Add missing punctuation mark to all ActionMailer docs [ci skip] 2015-09-28 21:17:44 +05:30
amitkumarsuroliya
6474c53dcb Add a missing period to ActionMailer Base docs [ci skip] 2015-09-28 18:15:15 +05:30
Isaac Betesh
efadc69daa When used by ActionMailer, ActionView should automatically use the correct MIME type just as it does when used by ActionDispatch #11157 2015-09-09 08:44:37 -04:00
Andrew Kampjes
f0a3af209f ActionMailer https on URL with force_ssl = true
`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.
2015-08-14 08:05:11 +12:00
mlbileschi
738be4457b fix comment about which mail headers are excluded 2015-08-11 16:30:47 -04:00
Kasper Timm Hansen
062cbd18dd Revert "Merge pull request #20758 from xijo/action_mailer_message_delivery_respects_i18n_locale"
This reverts commit f2a8c23654d69dd8f294971487b5abf0e5d891c3, reversing
changes made to 3046c9bbe154aa717a5147091be8b495ed8969c4.
2015-07-07 22:11:20 +02:00
Johannes Opper
ca2387eb01 ActionMailer::MessageDelivery respects current I18n.locale
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`.
2015-07-05 20:21:25 +02:00
Robin Dupret
0b57f090c9 Tiny documentation edits [ci skip] 2015-06-09 11:49:33 +02:00
Rafael Mendonça França
cecbf9ed32 Merge pull request #18587 from chrismcg/allow_deliver_later_queue_name_to_be_configured
Allow configuration of ActionMailer queue name
2015-06-03 13:25:32 -03:00
Chris McGrath
f5a131aaea Allow configuration of ActionMailer queue name 2015-06-02 10:49:49 +01:00
Rafael Mendonça França
b42d770b3b Make the wording less confusing
This partially reverts commit ac02df5c7827630a91acd9a6b916db9eda1f38b4.

[ci skip]
2015-05-29 15:24:13 -03:00
Manish Puri
9575f4fdca minor text change 2015-05-29 13:50:12 -04:00
Manish Puri
ac02df5c78 Update inline_preview_interceptor.rb 2015-05-29 13:44:46 -04:00
Gourav Tiwari
4547d87853 formatting changes [ci skip] 2015-05-17 10:41:27 -07:00
yuuji.yaginuma
49a59cc6a5 assert_emails in block form use the given number as expected value 2015-05-09 18:59:59 +09:00
Andrew White
faaed863dd Document inline image mailer preview interceptor
Explain what the interceptor is used for and how to remove it.
2015-05-04 19:46:51 +01:00
Andrew White
60239f3e5a Add support for inline images to mailer previews
Use a preview interceptor to search for inline cid: urls in src
attributes and convert them to data urls.
2015-05-04 10:56:59 +01:00
Yves Senn
767d60156b mailer previews for NullMail instances. Closes #19849. 2015-04-28 16:00:08 +02:00
Achilleas Pipinellis
e7d2cef1f4 AUTH PLAIN is Base64 encoded [ci skip]
Contrary to what the name suggests, PLAIN SMTP authentication is not
sent in plain text but is Base64 encoded like the LOGIN method. Their
difference is described in the third link below.

* https://tools.ietf.org/html/rfc4954
* https://en.wikipedia.org/wiki/SMTP_Authentication
* http://www.samlogic.net/articles/smtp-commands-reference-auth.htm
2015-04-28 11:49:13 +03:00
Zachary Scott
a647277fb9 Since the delegator wasn't identified earlier, we should here [ci skip] 2015-04-12 13:29:58 -07:00
Zachary Scott
1ffd603712 Merge branch 'action-mailer-async-doc-fixes' of https://github.com/mfazekas/rails into mfazekas-action-mailer-async-doc-fixes
Conflicts:
	actionmailer/lib/action_mailer/base.rb
2015-04-12 13:28:10 -07:00
Anton Davydov
91744696a4 [skip ci] Fix typo in actionmailer documentation 2015-03-15 23:32:24 +03:00
Anton Davydov
435aa7e34f [ci skip] Add code example for MailHelper#block_format documentation 2015-03-02 15:01:57 +03:00
yuuji.yaginuma
5ef18712c5 update docs to reflect that mailer generator add suffix to generated classes [ci skip] 2015-02-25 19:22:33 +09:00
Rafael Mendonça França
39c936b760 Merge pull request #18393 from y-yagi/fix_mailer
follow up to #18074
2015-02-18 19:05:07 -02:00
Anton Davydov
44a49e5534 Added default values for #format_paragraph docs [skip ci] 2015-02-15 20:29:58 +03:00
Rafael Mendonça França
855cca0662 Merge pull request #18521 from andrewvida/master
Correct the views that the mail method sends in API docs.
2015-01-14 17:47:52 -02:00
Andrew Vida
29a2977af5 Correct views mail method sends in API docs 2015-01-14 14:43:58 -05:00
Carlos Souza
6870d48d19 Add _mailer suffix to i18n path
For mailers created via generators

Follow up to #18074
2015-01-08 22:24:22 -05:00
George Claghorn
3f17fbd68d Add assert_enqueued_emails and assert_no_enqueued_emails 2015-01-08 09:41:22 -05:00
yuuji.yaginuma
af3eb5961e follow up to #18074
* ignore mailer suffix when generate test files
* add mailer suffix to view files
2015-01-08 22:21:54 +09:00
Carlos Souza
5697bdbb6d Add mailer suffix to generated files and classes
Following the same naming convention used in
controllers and jobs.
2015-01-06 10:46:22 -05:00
Rafael Mendonça França
bf7b8c193f Remove unneeded requires
These requires were added only to change deprecation message
2015-01-04 12:11:03 -03:00
claudiob
755dcd0691 Remove deprecated ActionMailer deliver & deliver!
These methods were deprecated in Rails 4.2 (see f4ee1147) so they can
be safely removed in Rails 5.0.
2015-01-04 11:58:41 -03:00
Arun Agrawal
4de18d0ead Update copyright notices to 2015 [ci skip] 2014-12-31 08:34:14 +01:00
Rafael Mendonça França
ecb1981bfd Template lookup now respect default locale and I18n fallbacks.
Given the following templates:

    mailer/demo.html.erb
    mailer/demo.en.html.erb
    mailer/demo.pt.html.erb

Before this change for a locale that doesn't have its related file
the `mailer/demo.html.erb` will
be rendered even if `en` is the default locale.

Now `mailer/demo.en.html.erb` has precedence over the file without
 locale.

Also, it is possible to give a fallback.

    mailer/demo.pt.html.erb
    mailer/demo.pt-BR.html.erb

So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be
 rendered given the right I18n fallback configuration.

Fixes #11884.
2014-12-29 23:48:35 -03:00
Yves Senn
ced687fe71 Merge pull request #18163 from y-yagi/fix_nodoc_typo
fix typo in nodoc [ci skip]
2014-12-23 08:42:51 +01:00
yuuji.yaginuma
2a110fcfc8 fix typo in nodoc 2014-12-23 16:03:17 +09:00