Class: Courrier::Email::Providers::Postmark

Inherits:
Base
  • Object
show all
Defined in:
lib/courrier/email/providers/postmark.rb

Constant Summary collapse

ENDPOINT_URL =
"https://api.postmarkapp.com/email"

Instance Method Summary collapse

Methods inherited from Base

#deliver, #initialize

Constructor Details

This class inherits a constructor from Courrier::Email::Providers::Base

Instance Method Details

#bodyObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/courrier/email/providers/postmark.rb', line 9

def body
  {
    "From" => @options.from,

    "To" => @options.to,
    "ReplyTo" => @options.reply_to,

    "Subject" => @options.subject,
    "TextBody" => @options.text,
    "HtmlBody" => @options.html,

    "MessageStream" => @provider_options.message_stream || "outbound"
  }.compact
end