Module: MailerInterceptorModule
- Included in:
- WhitelistRecipients::MailerInterceptor
- Defined in:
- lib/whitelist_recipients/mailer_interceptor.rb
Overview
methods to whitelist email address
Instance Method Summary collapse
-
#delivering_email(message) ⇒ Object
whitelist email addresses.
Instance Method Details
#delivering_email(message) ⇒ Object
whitelist email addresses
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/whitelist_recipients/mailer_interceptor.rb', line 6 def delivering_email() return unless .perform_deliveries return unless !!Rails.application.config.action_mailer&.smtp_settings smtp_settings = Rails.application.config.action_mailer.smtp_settings whitelist = smtp_settings[:whitelist_email_addresses] whitelist_cc = smtp_settings[:whitelist_mailer_cc] whitelist_bcc = smtp_settings[:whitelist_mailer_bcc] finalize_email_addresses(whitelist, ) finalize_cc(whitelist_cc, ) finalize_bcc(whitelist_bcc, ) end |