Disabled email notifications if developer_mode is enabled.

This commit is contained in:
Martin Edenhofer 2016-05-24 09:41:22 +02:00
parent 3c3a6c7ff0
commit 740e1dcfe8
2 changed files with 5 additions and 3 deletions

View file

@ -206,6 +206,11 @@ send via account
def deliver(mail_params, notification = false) 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[:adapter]
adapter_options = options adapter_options = options
if options[:outbound] && options[:outbound][:adapter] if options[:outbound] && options[:outbound][:adapter]

View file

@ -28,9 +28,6 @@ class Observer::Ticket::Article::CommunicateEmail::BackgroundJob
sender = Ticket::Article::Sender.lookup(id: record.sender_id) sender = Ticket::Article::Sender.lookup(id: record.sender_id)
if sender['name'] == 'System' if sender['name'] == 'System'
notification = true notification = true
# ignore notifications in developer mode
return if Setting.get('developer_mode') == true
end end
# get linked channel and send # get linked channel and send