This method is deprecated or moved on the latest stable version.
The last existing version (v6.0.0) is shown here.
receive(raw_mail)
public
Receives a raw email, parses it into an email object, decodes it,
instantiates a new mailer,
and passes the email object to the mailer object’s receive method.
If you want your mailer to be able to process incoming messages,
you’ll need to implement a receive method that
accepts the raw email string as a parameter:
# File actionmailer/lib/action_mailer/base.rb, line 567
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)
new.receive(mail)
end
end