Class: Mailjet::Mailer
- Inherits:
-
Mail::SMTP
- Object
- Mail::SMTP
- Mailjet::Mailer
- Defined in:
- lib/mailjet/mailer.rb
Overview
Mailjet::Mailer enables to send a Mail::Message via Mailjet SMTP relay servers User is the API key, and password the API secret
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Mailer
constructor
A new instance of Mailer.
Constructor Details
#initialize(options = {}) ⇒ Mailer
Returns a new instance of Mailer.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mailjet/mailer.rb', line 10 def initialize( = {}) ActionMailer::Base.default(from: Mailjet.config.default_from) if Mailjet.config.default_from.present? super({ address: 'in-v3.mailjet.com', port: 587, authentication: 'plain', user_name: .delete(:api_key) || Mailjet.config.api_key, password: .delete(:secret_key) || Mailjet.config.secret_key, enable_starttls_auto: true }.merge!()) end |