Class: Feed2Email::Mail

Inherits:
Object
  • Object
show all
Defined in:
lib/feed2email/mail.rb

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ Mail

Returns a new instance of Mail.



3
4
5
# File 'lib/feed2email/mail.rb', line 3

def initialize(entry)
  @entry = entry
end

Instance Method Details

#sendObject



7
8
9
10
11
12
13
14
15
# File 'lib/feed2email/mail.rb', line 7

def send
  sleep config['send_delay'] || 10 # avoid Net::SMTPServerBusy errors

  if send_with_smtp?
    send_with_smtp
  else
    send_with_sendmail
  end
end