Sha256: d0dce6ac27606b64fce1e5cb8f88cc246869d98da313e02643a643b8f899e5c1
Contents?: true
Size: 530 Bytes
Versions: 13
Compression:
Stored size: 530 Bytes
Contents
module Mail class Postmark attr_accessor :settings def initialize(values) self.settings = { :api_token => ENV['POSTMARK_API_TOKEN'] }.merge(values) end def deliver!(mail) settings = self.settings.dup api_token = settings.delete(:api_token) || settings.delete(:api_key) api_client = ::Postmark::ApiClient.new(api_token, settings) response = api_client.deliver_message(mail) if settings[:return_response] response else self end end end end
Version data entries
13 entries across 13 versions & 1 rubygems