Class: Spree::MailInterceptor
- Inherits:
-
Object
- Object
- Spree::MailInterceptor
- Defined in:
- lib/spree/mail_interceptor.rb
Class Method Summary collapse
Class Method Details
.delivering_email(message) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/spree/mail_interceptor.rb', line 8 def self.delivering_email() return unless mail_method = MailMethod.current .from ||= mail_method.preferred_mails_from if mail_method.preferred_intercept_email.present? .subject = "[#{.to}] #{.subject}" .to = mail_method.preferred_intercept_email end if mail_method.preferred_mail_bcc.present? .bcc = mail_method.preferred_mail_bcc end end |