Class: Eye::Notify::Mail
- Inherits:
-
Eye::Notify
- Object
- Eye::Notify
- Eye::Notify::Mail
- Defined in:
- lib/eye/notify/mail.rb
Constant Summary
Constants inherited from Eye::Notify
Instance Attribute Summary
Attributes included from Dsl::Validation
#defaults, #should_bes, #validates, #variants
Instance Method Summary collapse
Methods inherited from Eye::Notify
#async_notify, get_class, #initialize, #logger_sub_tag, #message_body, #message_subject, notify, #notify, register, validate!
Methods included from Dsl::Validation
Constructor Details
This class inherits a constructor from Eye::Notify
Instance Method Details
#execute ⇒ Object
21 22 23 |
# File 'lib/eye/notify/mail.rb', line 21 def execute smtp end |
#message ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/eye/notify/mail.rb', line 34 def h = [] h << "From: #{from_name} <#{from_mail || user}>" if from_mail || user h << "To: <#{contact}>" h << "Subject: #{}" h << "Date: #{msg_at.httpdate}" h << "Message-Id: <#{rand(1000000000).to_s(36)}.#{$$}.#{contact}>" "#{h * "\n"}\n#{}" end |
#smtp ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/eye/notify/mail.rb', line 25 def smtp args = [host, port, domain, user, password, auth] debug "called smtp with #{args}" Net::SMTP.start(*args) do |smtp| smtp.(, from_mail || user, contact) end end |