diff --git a/app/models/channel.rb b/app/models/channel.rb index a973cd01d..945643fdf 100644 --- a/app/models/channel.rb +++ b/app/models/channel.rb @@ -206,6 +206,11 @@ send via account def deliver(mail_params, notification = false) + # ignore notifications in developer mode + if notification == true && Setting.get('developer_mode') == true + logger.notice "Do not send notification #{mail_params.inspect} because of enabled developer_mode" + end + adapter = options[:adapter] adapter_options = options if options[:outbound] && options[:outbound][:adapter] diff --git a/app/models/observer/ticket/article/communicate_email/background_job.rb b/app/models/observer/ticket/article/communicate_email/background_job.rb index 6634be4fb..9c30050ce 100644 --- a/app/models/observer/ticket/article/communicate_email/background_job.rb +++ b/app/models/observer/ticket/article/communicate_email/background_job.rb @@ -28,9 +28,6 @@ class Observer::Ticket::Article::CommunicateEmail::BackgroundJob sender = Ticket::Article::Sender.lookup(id: record.sender_id) if sender['name'] == 'System' notification = true - - # ignore notifications in developer mode - return if Setting.get('developer_mode') == true end # get linked channel and send