Class: MailHandler::Receiving::Notification::EmailContent
- Inherits:
-
Object
- Object
- MailHandler::Receiving::Notification::EmailContent
- Defined in:
- lib/mailhandler/receiving/notification/email/content.rb
Overview
email notification sent
Instance Method Summary collapse
Instance Method Details
#retrieve(type, options, delay, from, to) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mailhandler/receiving/notification/email/content.rb', line 15 def retrieve(type, , delay, from, to) mail = Mail.new mail.from = from mail.to = to delay = (delay.to_f / 60).round(2) case type when :received mail.subject = "Received - delay was #{delay} minutes" mail.body = "Received - delay was #{delay} minutes - search by #{}" when :delayed mail.subject = "Over #{delay} minutes delay" mail.body = "Over #{delay} minutes delay - search by #{}" else raise StandardError, "Incorrect type: #{type}" end mail end |