net-smtp 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +2 -22
- data/lib/net/smtp.rb +5 -8
- data/net-smtp.gemspec +31 -0
- metadata +4 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a553539705577a75ced47c5c1545063cd3e1c970387efc971c5a7a8fd6d7ae77
|
|
4
|
+
data.tar.gz: 0aa64c220f2f039ba06783c633be8fc48e32fef6403027174447d5ff727b3c9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28e0e346f8089af704f0c024b6cba7645b109fcf7ba334b01d25330ec75f23f5cef3cbc9cae3ac277760dfe5838fcc54907fb9685754089fa6adc1a821c4b818
|
|
7
|
+
data.tar.gz: 50e319aeb644635517accb8b787a7d2a1839e00c1cfec643b757b22545b03b10475cf2ea927d9c96040950dfd9a6b752eb7b4e08931004abad77beabae15928c
|
data/LICENSE.txt
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Redistribution and use in source and binary forms, with or without
|
|
4
|
-
modification, are permitted provided that the following conditions
|
|
5
|
-
are met:
|
|
6
|
-
1. Redistributions of source code must retain the above copyright
|
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
|
8
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
|
10
|
-
documentation and/or other materials provided with the distribution.
|
|
11
|
-
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
13
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
14
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
15
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
16
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
17
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
18
|
-
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
19
|
-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
20
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
21
|
-
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
22
|
-
SUCH DAMAGE.
|
|
1
|
+
All the files in this distribution are covered under either the Ruby license or
|
|
2
|
+
the BSD-2-Clause license (see the file COPYING).
|
data/lib/net/smtp.rb
CHANGED
|
@@ -33,16 +33,12 @@ module Net
|
|
|
33
33
|
def initialize(response, message: nil)
|
|
34
34
|
if response.is_a?(::Net::SMTP::Response)
|
|
35
35
|
@response = response
|
|
36
|
-
|
|
36
|
+
super(message || response.message)
|
|
37
37
|
else
|
|
38
38
|
@response = nil
|
|
39
|
-
|
|
39
|
+
super(message || response)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
|
-
|
|
43
|
-
def message
|
|
44
|
-
@message || response.message
|
|
45
|
-
end
|
|
46
42
|
end
|
|
47
43
|
|
|
48
44
|
# Represents an SMTP authentication error.
|
|
@@ -192,7 +188,7 @@ module Net
|
|
|
192
188
|
# compatibility, but are deprecated and should be avoided.
|
|
193
189
|
#
|
|
194
190
|
class SMTP < Protocol
|
|
195
|
-
VERSION = "0.5.
|
|
191
|
+
VERSION = "0.5.2"
|
|
196
192
|
|
|
197
193
|
# The default SMTP port number, 25.
|
|
198
194
|
def SMTP.default_port
|
|
@@ -626,7 +622,7 @@ module Net
|
|
|
626
622
|
secret ||= password || args[2]
|
|
627
623
|
authtype ||= args[3]
|
|
628
624
|
if defined?(OpenSSL::VERSION)
|
|
629
|
-
ssl_context_params = @ssl_context_params || {}
|
|
625
|
+
ssl_context_params = @ssl_context_params&.dup || {}
|
|
630
626
|
unless ssl_context_params.has_key?(:verify_mode)
|
|
631
627
|
ssl_context_params[:verify_mode] = @tls_verify ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
|
|
632
628
|
end
|
|
@@ -668,6 +664,7 @@ module Net
|
|
|
668
664
|
if user || secret || authtype
|
|
669
665
|
check_auth_args authtype, user, secret
|
|
670
666
|
end
|
|
667
|
+
@error_occurred = false
|
|
671
668
|
s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do
|
|
672
669
|
tcp_socket(@address, @port)
|
|
673
670
|
end
|
data/net-smtp.gemspec
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
name = File.basename(__FILE__, ".gemspec")
|
|
4
|
+
version = ["lib", Array.new(name.count("-"), "..").join("/")].find do |dir|
|
|
5
|
+
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb"), :encoding => "UTF-8") do |line|
|
|
6
|
+
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
|
7
|
+
end rescue nil
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
Gem::Specification.new do |spec|
|
|
11
|
+
spec.name = name
|
|
12
|
+
spec.version = version
|
|
13
|
+
spec.authors = ["Yukihiro Matsumoto"]
|
|
14
|
+
spec.email = ["matz@ruby-lang.org"]
|
|
15
|
+
|
|
16
|
+
spec.summary = %q{Simple Mail Transfer Protocol client library for Ruby.}
|
|
17
|
+
spec.description = %q{Simple Mail Transfer Protocol client library for Ruby.}
|
|
18
|
+
spec.homepage = "https://github.com/ruby/net-smtp"
|
|
19
|
+
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
|
20
|
+
spec.required_ruby_version = ">= 2.6.0"
|
|
21
|
+
|
|
22
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
23
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
|
24
|
+
|
|
25
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
26
|
+
`git ls-files README.md NEWS.md LICENSE.txt net-smtp.gemspec lib`.split
|
|
27
|
+
end
|
|
28
|
+
spec.require_paths = ["lib"]
|
|
29
|
+
|
|
30
|
+
spec.add_dependency "net-protocol"
|
|
31
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: net-smtp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yukihiro Matsumoto
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: net-protocol
|
|
@@ -40,6 +39,7 @@ files:
|
|
|
40
39
|
- lib/net/smtp/auth_plain.rb
|
|
41
40
|
- lib/net/smtp/auth_xoauth2.rb
|
|
42
41
|
- lib/net/smtp/authenticator.rb
|
|
42
|
+
- net-smtp.gemspec
|
|
43
43
|
homepage: https://github.com/ruby/net-smtp
|
|
44
44
|
licenses:
|
|
45
45
|
- Ruby
|
|
@@ -47,7 +47,6 @@ licenses:
|
|
|
47
47
|
metadata:
|
|
48
48
|
homepage_uri: https://github.com/ruby/net-smtp
|
|
49
49
|
source_code_uri: https://github.com/ruby/net-smtp
|
|
50
|
-
post_install_message:
|
|
51
50
|
rdoc_options: []
|
|
52
51
|
require_paths:
|
|
53
52
|
- lib
|
|
@@ -62,8 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
62
61
|
- !ruby/object:Gem::Version
|
|
63
62
|
version: '0'
|
|
64
63
|
requirements: []
|
|
65
|
-
rubygems_version: 3.
|
|
66
|
-
signing_key:
|
|
64
|
+
rubygems_version: 3.6.9
|
|
67
65
|
specification_version: 4
|
|
68
66
|
summary: Simple Mail Transfer Protocol client library for Ruby.
|
|
69
67
|
test_files: []
|