Module: SendgridSmtpApi::InternalMailerHeaders

Included in:
InternalNotificationMailer
Defined in:
lib/sendgrid_smtp_api.rb

Overview

Prepended on +InternalNotificationMailer+ so every internal email disables SendGrid engagement apps
(same intent as the old +sendgrid_disable+ instance API; the class-level DSL was ineffective).

Instance Method Summary collapse

Instance Method Details

#mail(headers = {}) ⇒ Object



45
46
47
48
49
50
# File 'lib/sendgrid_smtp_api.rb', line 45

def mail(headers = {}, &)
  self.headers['X-SMTPAPI'] = SendgridSmtpApi.build_x_smtpapi_header(
    disabled_filters: %i[ganalytics opentrack clicktrack]
  )
  super
end