Class: Courrier::Email::Providers::Mailjet
- Inherits:
-
Base
- Object
- Base
- Courrier::Email::Providers::Mailjet
show all
- Defined in:
- lib/courrier/email/providers/mailjet.rb
Constant Summary
collapse
- ENDPOINT_URL =
"https://api.mailjet.com/v3.1/send"
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#deliver, #initialize
Class Method Details
.config_options ⇒ Object
7
|
# File 'lib/courrier/email/providers/mailjet.rb', line 7
def self.config_options = %w[api_secret]
|
Instance Method Details
#body ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/courrier/email/providers/mailjet.rb', line 11
def body
{
"Messages" => [
{
"From" => {
"Email" => @options.from
},
"To" => [
{
"Email" => @options.to
}
],
"ReplyTo" => reply_to_object,
"Subject" => @options.subject,
"TextPart" => @options.text,
"HTMLPart" => @options.html
}.compact
]
}
end
|