Class: AlchemyCrm::BounceReceiver
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- AlchemyCrm::BounceReceiver
- Defined in:
- app/mailers/alchemy_crm/bounce_receiver.rb
Instance Method Summary collapse
Instance Method Details
#receive(email) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/mailers/alchemy_crm/bounce_receiver.rb', line 4 def receive(email) return unless email.content_type == "multipart/report" bounce = BouncedDelivery.from_email(email) recipient = Recipient.(bounce.) recipient.bounced = (bounce.status == "Failure") recipient.save! end |