From e3f832a7433a291a51c5df397dc3dd654c1858cb Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Thu, 27 Dec 2018 21:15:10 -0500 Subject: Deprecate ActionMailer::Base.receive in favor of Action Mailbox --- actionmailer/lib/action_mailer/base.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionmailer/lib') 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) -- cgit v1.2.3