Class: MailHandler::Receiving::Notification::EmailContent

Inherits:
Object
  • Object
show all
Defined in:
lib/mailhandler/receiving/notification/email/content.rb

Class Method Summary collapse

Class Method Details

.email_delayed(options, delay, from, to) ⇒ Object

Parameters:

  • options (Hash)
    • search options used for searching for an email

  • delay (Int)
    • delay in seconds

  • from (String)
    • email address

  • to (String)
    • email address



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/mailhandler/receiving/notification/email/content.rb', line 32

def self.email_delayed(options, delay, from, to)

  Mail.new do

    from from
    subject "Over #{(delay.to_f/60).round(2)} minutes delay"
    body "Over #{(delay.to_f/60).round(2)} minutes delay - search by #{options}"
    to to

  end

end

.email_received(options, delay, from, to) ⇒ Object

Parameters:

  • options (Hash)
    • search options used for searching for an email

  • delay (Int)
    • delay in seconds

  • from (String)
    • email address

  • to (String)
    • email address



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/mailhandler/receiving/notification/email/content.rb', line 15

def self.email_received(options, delay, from, to)

  Mail.new do

    from from
    subject "Received - delay was #{(delay.to_f/60).round(2)} minutes"
    body "Received - delay was #{(delay.to_f/60).round(2)} minutes - search by #{options}"
    to to

  end

end