Class: Ezframe::Email
Class Method Summary collapse
- .receive ⇒ Object
- .send(data) ⇒ Object
-
.setup_smtp(options) ⇒ Object
options = :address => “smtp.server.host”, :port => 1025, :user_name => login user, :password => login password, :authentication => ‘plain’, :ssl => true,.
Class Method Details
.receive ⇒ Object
6 7 8 |
# File 'lib/ezframe/email.rb', line 6 def receive end |
.send(data) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# 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) ⇒ Object
options =
:address => "smtp.server.host",
:port => 1025,
:user_name => login user,
:password => login password,
:authentication => 'plain',
:ssl => true,
17 18 19 20 21 |
# File 'lib/ezframe/email.rb', line 17 def setup_smtp() Mail.defaults do delivery_method :smtp, end end |