Method: Eye::Notify::Mail#smtp

Defined in:
lib/eye/notify/mail.rb

#smtpObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/eye/notify/mail.rb', line 27

def smtp
  args = [host, port, domain, user, password, auth]
  debug { "called smtp with #{args}" }
  smtp = Net::SMTP.new host, port
  smtp.enable_starttls if starttls

  smtp.start(domain, user, password, auth) do |s|
    s.send_message(message, from_mail || user, contact)
  end
end