2018-11-05 23:45:35 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-07-16 05:23:15 -04:00
|
|
|
module Gitlab
|
|
|
|
module Email
|
|
|
|
module Hook
|
|
|
|
class DisableEmailInterceptor
|
|
|
|
def self.delivering_email(message)
|
|
|
|
message.perform_deliveries = false
|
|
|
|
|
2020-09-09 20:08:32 -04:00
|
|
|
Gitlab::AppLogger.info "Emails disabled! Interceptor prevented sending mail #{message.subject}"
|
2018-07-16 05:23:15 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|