From 0c78056a69cc3bee7fb1cd3261046995db55bfdf Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 10 Oct 2018 17:13:09 +0000 Subject: Send emails asynchronously (#26791). Custom async_* delivery methods are removed in favor of ActiveJob (Async by default). git-svn-id: http://svn.redmine.org/redmine/trunk@17588 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/admin_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers/admin_controller.rb') diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index dfc73c5ab..885c3a169 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -60,16 +60,12 @@ class AdminController < ApplicationController end def test_email - raise_delivery_errors = ActionMailer::Base.raise_delivery_errors - # Force ActionMailer to raise delivery errors so we can catch it - ActionMailer::Base.raise_delivery_errors = true begin - @test = Mailer.test_email(User.current).deliver + Mailer.deliver_test_email(User.current) flash[:notice] = l(:notice_email_sent, ERB::Util.h(User.current.mail)) rescue Exception => e flash[:error] = l(:notice_email_error, ERB::Util.h(Redmine::CodesetUtil.replace_invalid_utf8(e.message.dup))) end - ActionMailer::Base.raise_delivery_errors = raise_delivery_errors redirect_to settings_path(:tab => 'notifications') end -- cgit v1.2.3