mail 2.8.0.rc2 → 2.8.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mail/message.rb +1 -1
- data/lib/mail/network/delivery_methods/smtp.rb +22 -6
- data/lib/mail/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac99b70fae085914a2fbc153a38f199ddda35671f0e488b6ae6b578c16ef868e
|
4
|
+
data.tar.gz: 031535fbd036e814e7619a7f4a0e353cfdd64460ed8904525da349d691f92bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4beae958c4b21822b7739401118b515d4b02d9dbdb5b37135a60da5aa647eb8b905937a0c45e093c6deca134355e53340208cd321816bde3cdec12cb6197b96b
|
7
|
+
data.tar.gz: 5155f9bb2fa57c864b4c42faaf0c2981724c7db2664eebe41c6c09139c8f23f02a3409bcea202676dd783fb660659f6a7ff839d320a9ffa3fe4c19b289f77aeb
|
data/lib/mail/message.rb
CHANGED
@@ -1496,7 +1496,7 @@ module Mail
|
|
1496
1496
|
# Returns the character set defined in the content type field
|
1497
1497
|
def charset
|
1498
1498
|
if @header
|
1499
|
-
has_content_type? ? content_type_parameters['charset'] : @charset
|
1499
|
+
has_content_type? && !multipart? ? content_type_parameters['charset'] : @charset
|
1500
1500
|
else
|
1501
1501
|
@charset
|
1502
1502
|
end
|
@@ -111,17 +111,33 @@ module Mail
|
|
111
111
|
|
112
112
|
def build_smtp_session
|
113
113
|
Net::SMTP.new(settings[:address], settings[:port]).tap do |smtp|
|
114
|
-
|
115
|
-
|
114
|
+
tls = settings[:tls] || settings[:ssl]
|
115
|
+
if !tls.nil?
|
116
|
+
case tls
|
117
|
+
when true
|
116
118
|
smtp.enable_tls(ssl_context)
|
119
|
+
when false
|
120
|
+
smtp.disable_tls
|
121
|
+
else
|
122
|
+
raise ArgumentError, "Unrecognized :tls value #{settings[:tls].inspect}; expected true, false, or nil"
|
117
123
|
end
|
118
|
-
elsif settings[:enable_starttls]
|
119
|
-
|
124
|
+
elsif settings.include?(:enable_starttls) && !settings[:enable_starttls].nil?
|
125
|
+
case settings[:enable_starttls]
|
126
|
+
when true
|
120
127
|
smtp.enable_starttls(ssl_context)
|
128
|
+
when false
|
129
|
+
smtp.disable_starttls
|
130
|
+
else
|
131
|
+
raise ArgumentError, "Unrecognized :enable_starttls value #{settings[:enable_starttls].inspect}; expected true, false, or nil"
|
121
132
|
end
|
122
|
-
elsif settings[:enable_starttls_auto]
|
123
|
-
|
133
|
+
elsif settings.include?(:enable_starttls_auto) && !settings[:enable_starttls_auto].nil?
|
134
|
+
case settings[:enable_starttls_auto]
|
135
|
+
when true
|
124
136
|
smtp.enable_starttls_auto(ssl_context)
|
137
|
+
when false
|
138
|
+
smtp.disable_starttls_auto
|
139
|
+
else
|
140
|
+
raise ArgumentError, "Unrecognized :enable_starttls_auto value #{settings[:enable_starttls_auto].inspect}; expected true, false, or nil"
|
125
141
|
end
|
126
142
|
end
|
127
143
|
|
data/lib/mail/version.rb
CHANGED