Patch #29614 ยป replace-receive-with-safe_receive.diff
| 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
|
||