Module: Reporting
- Included in:
- Inari::Commands
- Defined in:
- lib/inari/commands/reporting.rb
Instance Method Summary collapse
Instance Method Details
#email(options = {}) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/inari/commands/reporting.rb', line 2 def email(={}) from = "#{Etc.getlogin}@#{Socket.gethostname}" to = Inari::configuration.[:email_to] =<<MESSAGE From: #{from} To: #{to} Subject: #{[:subject]} #{[:body]} MESSAGE Net::SMTP.start(Inari::configuration.[:smtp_host]) do |smtp| smtp. , from, to end end |