Class: Lazylead::Smtp
- Inherits:
-
Object
- Object
- Lazylead::Smtp
- Defined in:
- lib/lazylead/smtp.rb
Overview
The emails configuration over SMTP protocol.
- Author
-
Yurii Dubinka ([email protected])
- Copyright
-
Copyright © 2019-2020 Yurii Dubinka
- License
-
MIT
Instance Method Summary collapse
- #enable ⇒ Object
-
#initialize(log = Log.new, salt = NoSalt.new, opts = {}) ⇒ Smtp
constructor
A new instance of Smtp.
Constructor Details
Instance Method Details
#enable ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/lazylead/smtp.rb', line 44 def enable if @opts.empty? || @opts[:test_mode] || @opts[:smtp_host].blank? Mail.defaults do delivery_method :test end @log.warn "SMTP connection enabled in " \ "#{'test'.colorize(:light_yellow)} mode." else setup_smtp end end |