lib/mailgun/client.rb in mailgun-ruby-1.2.3 vs lib/mailgun/client.rb in mailgun-ruby-1.2.4

- old
+ new

@@ -62,9 +62,11 @@ # @param [String] working_domain This is the domain you wish to send from. # @param [Hash] data This should be a standard Hash # containing required parameters for the requested resource. # @return [Mailgun::Response] A Mailgun::Response object. def send_message(working_domain, data) + fail ParameterError.new('Missing working domain', working_domain) unless working_domain + if test_mode? then Mailgun::Client.deliveries << data return Response.from_hash( { :body => '{"id": "test-mode-mail@localhost", "message": "Queued. Thank you."}',