Project

General

Profile

Patch #29614 ยป replace-receive-with-safe_receive.diff

Go MAEDA, 2018-09-15 07:04

View differences:

app/controllers/mail_handler_controller.rb (working copy)
def index
options = params.dup
email = options.delete(:email)
if MailHandler.receive(email, options)
if MailHandler.safe_receive(email, options)
head :created
else
head :unprocessable_entity
lib/tasks/email.rake (working copy)
task :read => :environment do
Mailer.with_synched_deliveries do
MailHandler.receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
MailHandler.safe_receive(STDIN.read, MailHandler.extract_options_from_env(ENV))
end
end
    (1-1/1)