malone 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/malone.rb +15 -2
- data/malone.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4b3229ea37426d098ec276c2dd39d4ae51c4d82
|
4
|
+
data.tar.gz: 431a420d9f22ff479644b25ea934a680b96db326
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d4f178cc9c09b5eaabbc99afb8450a7b7e8648dc0df33c2ad10adb6e4671f07b96ed597115b6d832de3b067ad2861a6ed4cc514d97a37edb910f20159cef028
|
7
|
+
data.tar.gz: 172b40dda19aebe92679fa3b961242dee49b66da5d33a056f79505130d595ba4f99e7fe9f57c092e22ccf876ca45e0dbf60d96305150ada58e996d1e7a311cb3
|
data/lib/malone.rb
CHANGED
@@ -33,7 +33,12 @@ class Malone
|
|
33
33
|
yield mail if block_given?
|
34
34
|
|
35
35
|
smtp = Net::SMTP.new(config.host, config.port)
|
36
|
-
|
36
|
+
|
37
|
+
if config.force_tls
|
38
|
+
smtp.enable_starttls
|
39
|
+
elsif config.tls
|
40
|
+
smtp.enable_starttls_auto
|
41
|
+
end
|
37
42
|
|
38
43
|
begin
|
39
44
|
smtp.start(config.domain, config.user, config.password, config.auth)
|
@@ -67,7 +72,7 @@ class Malone
|
|
67
72
|
attr_accessor :password
|
68
73
|
attr_accessor :domain
|
69
74
|
attr_accessor :tls
|
70
|
-
|
75
|
+
attr_accessor :force_tls
|
71
76
|
attr :auth
|
72
77
|
|
73
78
|
def initialize(options)
|
@@ -84,6 +89,14 @@ class Malone
|
|
84
89
|
opts[:port] ||= uri.port.to_i
|
85
90
|
opts[:user] ||= unescaped(uri.user)
|
86
91
|
opts[:password] ||= unescaped(uri.password)
|
92
|
+
|
93
|
+
additional_opts = Hash[uri.query.to_s.split('&').map { |e| e.split('=')}]
|
94
|
+
|
95
|
+
if additional_opts.has_key?('force_tls')
|
96
|
+
@force_tls = true
|
97
|
+
elsif additional_opts.has_key?('tls')
|
98
|
+
@tls = true
|
99
|
+
end
|
87
100
|
end
|
88
101
|
|
89
102
|
opts.each do |key, val|
|
data/malone.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: malone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril David
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
77
|
rubyforge_project:
|
78
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.5.2.3
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: The Mailman
|