Skip to content

Commit bf27727

Browse files
authored
Merge pull request #62 from ruby/v0-4-0
v0.4.0
2 parents 531c797 + d2e381f commit bf27727

3 files changed

Lines changed: 24 additions & 17 deletions

File tree

NEWS.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
# NEWS
22

3-
## Version 0.4.0
3+
## Version 0.4.0 (2023-09-20)
44

5-
* add Net::SMTP::Authenticator class and auth_* methods are separated from the Net::SMTP class. <https://github.com/ruby/net-smtp/pull/53/files>
5+
### Improvements
6+
7+
* add Net::SMTP::Authenticator class and auth_* methods are separated from the Net::SMTP class. <https://github.com/ruby/net-smtp/pull/53>
8+
This allows you to add a new authentication method to Net::SMTP.
9+
Create a class with an `auth` method that inherits Net::SMTP::Authenticator.
10+
The `auth` method has two arguments, `user` and `secret`.
11+
Send an instruction to the SMTP server by using the `continue` or `finish` method.
12+
For more information, see lib/net/smtp/auto _*.rb.
13+
* Add SMTPUTF8 support <https://github.com/ruby/net-smtp/pull/49>
14+
15+
### Fixes
16+
17+
* Revert "Replace Timeout.timeout with socket timeout" <https://github.com/ruby/net-smtp/pull/51>
18+
* Fixed issue sending emails to unaffected recipients on 53x error <https://github.com/ruby/net-smtp/pull/56>
19+
20+
### Others
621

7-
* Add SMTPUTF8 support <https://github.com/ruby/net-smtp/pull/49>
22+
* Removed unnecessary Subversion keywords <https://github.com/ruby/net-smtp/pull/57>
823

924
## Version 0.3.3 (2022-10-29)
1025

lib/net/smtp.rb

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# = net/smtp.rb
34
#
45
# Copyright (c) 1999-2007 Yukihiro Matsumoto.
@@ -22,7 +23,6 @@
2223
end
2324

2425
module Net
25-
2626
# Module mixed in to all SMTP error classes
2727
module SMTPError
2828
# This *class* is a module for backward compatibility.
@@ -36,7 +36,7 @@ def initialize(response, message: nil)
3636
@message = message
3737
else
3838
@response = nil
39-
@message = message || response
39+
@message = message || response
4040
end
4141
end
4242

@@ -187,7 +187,7 @@ class SMTPUnsupportedCommand < ProtocolError
187187
# user: 'Your Account', secret: 'Your Password', authtype: :cram_md5)
188188
#
189189
class SMTP < Protocol
190-
VERSION = "0.3.3"
190+
VERSION = "0.4.0"
191191

192192
# The default SMTP port number, 25.
193193
def SMTP.default_port
@@ -210,7 +210,7 @@ class << self
210210

211211
def SMTP.default_ssl_context(ssl_context_params = nil)
212212
context = OpenSSL::SSL::SSLContext.new
213-
context.set_params(ssl_context_params ? ssl_context_params : {})
213+
context.set_params(ssl_context_params || {})
214214
context
215215
end
216216

@@ -281,7 +281,7 @@ def inspect
281281
attr_accessor :esmtp
282282

283283
# +true+ if the SMTP object uses ESMTP (which it does by default).
284-
alias :esmtp? :esmtp
284+
alias esmtp? esmtp
285285

286286
# true if server advertises STARTTLS.
287287
# You cannot get valid value before opening SMTP session.
@@ -829,8 +829,6 @@ def open_message_stream(from_addr, *to_addrs, &block) # :yield: stream
829829
# Authentication
830830
#
831831

832-
public
833-
834832
DEFAULT_AUTH_TYPE = :plain
835833

836834
def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE)
@@ -1130,11 +1128,9 @@ def to_s
11301128
@address
11311129
end
11321130
end
1133-
11341131
end # class SMTP
11351132

11361133
SMTPSession = SMTP # :nodoc:
1137-
11381134
end
11391135

11401136
require_relative 'smtp/authenticator'

net-smtp.gemspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ Gem::Specification.new do |spec|
2222
spec.metadata["homepage_uri"] = spec.homepage
2323
spec.metadata["source_code_uri"] = spec.homepage
2424

25-
spec.files = %w[
26-
LICENSE.txt
27-
lib/net/smtp.rb
28-
net-smtp.gemspec
29-
]
25+
spec.files = `git ls-files README.md NEWS.md LICENSE.txt lib`.split
3026
spec.require_paths = ["lib"]
3127

3228
spec.add_dependency "net-protocol"

0 commit comments

Comments
 (0)