planet_express 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +2 -0
- data/Gemfile.lock +1 -1
- data/lib/planet_express/configuration.rb +1 -1
- data/lib/planet_express/delivery.rb +6 -5
- data/lib/planet_express/version.rb +1 -1
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,7 +9,7 @@ module PlanetExpress
|
|
9
9
|
# Settings
|
10
10
|
self.configuration ||= PlanetExpress::Configuration.new
|
11
11
|
self.logger = Rails.logger
|
12
|
-
logger.
|
12
|
+
logger.debug "gateway_url => #{configuration.gateway_url}"
|
13
13
|
end
|
14
14
|
|
15
15
|
def configure
|
@@ -28,7 +28,8 @@ module PlanetExpress
|
|
28
28
|
def deliver!
|
29
29
|
url = URI.parse configuration.gateway_url
|
30
30
|
http, resp = Net::HTTP.new(url.host, url.port), ''
|
31
|
-
http.use_ssl =
|
31
|
+
http.use_ssl = url.scheme == 'https'
|
32
|
+
logger.debug "SSL version: #{http.ssl_version.inspect}" if http.use_ssl?
|
32
33
|
|
33
34
|
http.start do |h|
|
34
35
|
path = url.path
|
@@ -95,11 +96,11 @@ module PlanetExpress
|
|
95
96
|
recipients_received = @response.at('RECIPIENTS_RECEIVED').innerHTML
|
96
97
|
emails_sent = @response.at('EMAILS_SENT').innerHTML
|
97
98
|
|
98
|
-
logger.info "Delivering: (#{emails_sent}/#{recipients_received})"
|
99
|
-
logger.warn "Can't retrieve the response!" if @response.nil?
|
100
99
|
logger.error "Error: #{error_string}" if status == 2
|
100
|
+
logger.warn "Can't retrieve the response!" if @response.nil?
|
101
|
+
logger.info "Email (#{emails_sent}/#{recipients_received}) delivered."
|
101
102
|
|
102
|
-
return
|
103
|
+
return response
|
103
104
|
end
|
104
105
|
end
|
105
106
|
end
|