Class: Mailer
- Inherits:
-
Object
- Object
- Mailer
- Defined in:
- lib/backupper/mailer.rb
Class Method Summary collapse
Class Method Details
.send(report, from:, to:, password:, address:, port:, authentication:) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/backupper/mailer.rb', line 4 def self.send(report, from:, to:, password:, address:, port:, authentication:) Mail.defaults do delivery_method :smtp, { address: address, port: port, user_name: from, password: password, authentication: authentication, enable_starttls_auto: true } end Mail.deliver(to: to, from: from, subject: generate_subject(report), body: generate_body(report)) end |