Disabled email notifications if developer_mode is enabled.
This commit is contained in:
parent
3c3a6c7ff0
commit
740e1dcfe8
2 changed files with 5 additions and 3 deletions
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue