remailer 0.3.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/remailer/connection.rb +11 -3
- data/remailer.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
data/lib/remailer/connection.rb
CHANGED
@@ -28,7 +28,7 @@ class Remailer::Connection < EventMachine::Connection
|
|
28
28
|
# == Properties ===========================================================
|
29
29
|
|
30
30
|
attr_accessor :remote, :max_size, :protocol, :hostname
|
31
|
-
attr_accessor :pipelining, :tls_support
|
31
|
+
attr_accessor :pipelining, :tls_support, :auth_support
|
32
32
|
attr_accessor :timeout
|
33
33
|
attr_accessor :options
|
34
34
|
attr_reader :error, :error_message
|
@@ -104,6 +104,7 @@ class Remailer::Connection < EventMachine::Connection
|
|
104
104
|
# allow for debugging, exceptions are dumped to STDERR as a last resort.
|
105
105
|
@options = options
|
106
106
|
@hostname = @options[:hostname] || Socket.gethostname
|
107
|
+
@timeout = @options[:timeout] || DEFAULT_TIMEOUT
|
107
108
|
|
108
109
|
@messages = [ ]
|
109
110
|
|
@@ -139,6 +140,13 @@ class Remailer::Connection < EventMachine::Connection
|
|
139
140
|
def tls_support?
|
140
141
|
!!@tls_support
|
141
142
|
end
|
143
|
+
|
144
|
+
# Returns true if the connection has advertised authentication support, or
|
145
|
+
# false if not availble or could not be detected. This will only work with
|
146
|
+
# ESMTP capable servers.
|
147
|
+
def auth_support?
|
148
|
+
!!@auth_support
|
149
|
+
end
|
142
150
|
|
143
151
|
# Returns true if the connection will be using a proxy to connect, false
|
144
152
|
# otherwise.
|
@@ -267,7 +275,7 @@ class Remailer::Connection < EventMachine::Connection
|
|
267
275
|
end
|
268
276
|
|
269
277
|
def reset_timeout!
|
270
|
-
@timeout_at = Time.now +
|
278
|
+
@timeout_at = Time.now + @timeout
|
271
279
|
end
|
272
280
|
|
273
281
|
def check_for_timeouts!
|
@@ -368,7 +376,7 @@ class Remailer::Connection < EventMachine::Connection
|
|
368
376
|
|
369
377
|
def connect_notification(code, message = nil)
|
370
378
|
send_notification(:connect, code, message || self.remote)
|
371
|
-
send_callback(:
|
379
|
+
send_callback(:on_connect)
|
372
380
|
end
|
373
381
|
|
374
382
|
def error_notification(code, message)
|
data/remailer.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{remailer}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Scott Tadman"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-16}
|
13
13
|
s.description = %q{EventMachine capable SMTP engine}
|
14
14
|
s.email = %q{scott@twg.ca}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 4
|
9
|
+
version: 0.3.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Scott Tadman
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-16 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|