Sha256: 6ce72542e264617cff81a8efc9a6c16ebf40f6c4a3311fb532d84859a7a7601c
Contents?: true
Size: 538 Bytes
Versions: 4
Compression:
Stored size: 538 Bytes
Contents
module Mail class SimplePostmark include HTTParty def initialize(values) self.settings = { api_key: '********-****-****-****-************' }.merge!(values) end attr_accessor :settings base_uri 'http://api.postmarkapp.com' headers 'Accept' => 'application/json', 'ContentType' => 'application/json' def deliver!(mail) self.class.post('/email', headers: self.class.headers.merge('X-Postmark-Server-Token' => settings[:api_key].to_s), body: mail.to_postmark.to_json) end end end
Version data entries
4 entries across 4 versions & 1 rubygems