class Ezframe::Email

Public Class Methods

receive() click to toggle source
# File lib/ezframe/email.rb, line 6
def receive

end
send(data) click to toggle source
# File lib/ezframe/email.rb, line 23
def send(data)
  mail = Mail.new do
    from     data[:mail_from]
    to       data[:mail_to]
    subject  data[:subject]
    body     data[:body]
  end
  mail.deliver! 
end
setup_smtp(options) click to toggle source

options =

:address              => "smtp.server.host",
:port                 => 1025,
:user_name            => login user,
:password             => login password,
:authentication       => 'plain',
:ssl => true,
# File lib/ezframe/email.rb, line 17
def setup_smtp(options)
  Mail.defaults do
    delivery_method :smtp, options
  end
end