Class: Mailkick::Service::Postmark
- Inherits:
-
Mailkick::Service
- Object
- Mailkick::Service
- Mailkick::Service::Postmark
- Defined in:
- lib/mailkick/service/postmark.rb
Constant Summary collapse
- REASONS_MAP =
{ "SpamNotification" => "spam", "SpamComplaint" => "spam", "Unsubscribe" => "unsubscribe", }
Constants inherited from Mailkick::Service
Class Method Summary collapse
Instance Method Summary collapse
- #bounces ⇒ Object
-
#initialize(options = {}) ⇒ Postmark
constructor
A new instance of Postmark.
- #opt_outs ⇒ Object
Methods inherited from Mailkick::Service
Constructor Details
#initialize(options = {}) ⇒ Postmark
Returns a new instance of Postmark.
12 13 14 |
# File 'lib/mailkick/service/postmark.rb', line 12 def initialize( = {}) @client = ::Postmark::ApiClient.new([:api_key] || ENV["POSTMARK_API_KEY"]) end |
Class Method Details
.discoverable? ⇒ Boolean
24 25 26 |
# File 'lib/mailkick/service/postmark.rb', line 24 def self.discoverable? !!(defined?(::Postmark) && ENV["POSTMARK_API_KEY"]) end |
Instance Method Details
#bounces ⇒ Object
20 21 22 |
# File 'lib/mailkick/service/postmark.rb', line 20 def bounces fetch(@client.bounces) end |
#opt_outs ⇒ Object
16 17 18 |
# File 'lib/mailkick/service/postmark.rb', line 16 def opt_outs bounces end |