Class: Spree::Core::MailInterceptor
- Inherits:
-
Object
- Object
- Spree::Core::MailInterceptor
- Defined in:
- lib/spree/core/mail_interceptor.rb
Class Method Summary collapse
Class Method Details
.delivering_email(message) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/spree/core/mail_interceptor.rb', line 9 def self.delivering_email() return unless mail_method = Spree::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 |