aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-12-27 21:15:10 -0500
committerGeorge Claghorn <george@basecamp.com>2018-12-27 21:17:58 -0500
commite3f832a7433a291a51c5df397dc3dd654c1858cb (patch)
tree3137f4fcdd79768e24e1a6778a1cc5ae1c9e74de /actionmailer/lib
parent22a6ff68b1264de693364dd89be651dda9626284 (diff)
downloadrails-e3f832a7433a291a51c5df397dc3dd654c1858cb.tar.gz
rails-e3f832a7433a291a51c5df397dc3dd654c1858cb.tar.bz2
rails-e3f832a7433a291a51c5df397dc3dd654c1858cb.zip
Deprecate ActionMailer::Base.receive in favor of Action Mailbox
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 8ddc90b9df..650dd8bbda 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -565,6 +565,11 @@ module ActionMailer
# end
# end
def receive(raw_mail)
+ ActiveSupport::Deprecation.warn(<<~MESSAGE.squish)
+ ActionMailer::Base.receive is deprecated and will be removed in Rails 6.1.
+ Use Action Mailbox to process inbound email.
+ MESSAGE
+
ActiveSupport::Notifications.instrument("receive.action_mailer") do |payload|
mail = Mail.new(raw_mail)
set_payload_for_mail(payload, mail)