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