lib/snails/mailer.rb in snails-0.6.0 vs lib/snails/mailer.rb in snails-0.6.1

- old
+ new

@@ -208,11 +208,12 @@ @original_filename = filename @content_type = content_type || 'application/octet-stream' end end - def initialize(api_key:, domain_name:) - # @key = api_key + def initialize(options = {}) + api_key = options[:api_key] + domain_name = options[:domain_name] @url = "https://api:#{api_key}@api.mailgun.net/v3/#{domain_name}/messages" end def deliver(email, options = {}) raise "No body!" if email[:body].nil? \ No newline at end of file