packwerk 2.2.0 → 2.2.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/.github/workflows/ci.yml +29 -20
- data/.github/workflows/cla.yml +22 -0
- data/.rubocop.yml +48 -19
- data/Gemfile +7 -2
- data/Gemfile.lock +202 -175
- data/README.md +1 -1
- data/RESOLVING_VIOLATIONS.md +81 -0
- data/Rakefile +1 -1
- data/USAGE.md +14 -5
- data/bin/m +1 -1
- data/bin/rake +1 -1
- data/bin/rubocop +1 -1
- data/bin/srb +1 -1
- data/bin/tapioca +1 -1
- data/gemfiles/Gemfile-rails-6-0 +1 -1
- data/gemfiles/Gemfile-rails-6-1 +22 -0
- data/lib/packwerk/application_load_paths.rb +1 -1
- data/lib/packwerk/application_validator.rb +7 -6
- data/lib/packwerk/association_inspector.rb +17 -15
- data/lib/packwerk/cache.rb +36 -29
- data/lib/packwerk/cli.rb +24 -20
- data/lib/packwerk/const_node_inspector.rb +8 -7
- data/lib/packwerk/constant_name_inspector.rb +2 -2
- data/lib/packwerk/deprecated_references.rb +40 -20
- data/lib/packwerk/file_processor.rb +14 -14
- data/lib/packwerk/files_for_processing.rb +27 -31
- data/lib/packwerk/formatters/offenses_formatter.rb +3 -3
- data/lib/packwerk/formatters/progress_formatter.rb +2 -2
- data/lib/packwerk/node.rb +1 -294
- data/lib/packwerk/node_helpers.rb +335 -0
- data/lib/packwerk/node_processor.rb +6 -5
- data/lib/packwerk/node_processor_factory.rb +3 -3
- data/lib/packwerk/node_visitor.rb +1 -1
- data/lib/packwerk/offense_collection.rb +27 -8
- data/lib/packwerk/offenses_formatter.rb +2 -2
- data/lib/packwerk/package.rb +3 -0
- data/lib/packwerk/package_set.rb +2 -0
- data/lib/packwerk/parse_run.rb +29 -20
- data/lib/packwerk/parsed_constant_definitions.rb +23 -20
- data/lib/packwerk/parsers/erb.rb +3 -3
- data/lib/packwerk/reference_checking/checkers/checker.rb +16 -3
- data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +16 -0
- data/lib/packwerk/reference_checking/checkers/privacy_checker.rb +18 -0
- data/lib/packwerk/reference_checking/reference_checker.rb +3 -1
- data/lib/packwerk/reference_extractor.rb +51 -48
- data/lib/packwerk/reference_offense.rb +3 -27
- data/lib/packwerk/run_context.rb +9 -8
- data/lib/packwerk/spring_command.rb +1 -1
- data/lib/packwerk/version.rb +1 -1
- data/lib/packwerk.rb +1 -0
- data/packwerk.gemspec +5 -12
- data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +2754 -0
- data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +1496 -0
- data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +2362 -0
- data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +19397 -0
- data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +1569 -0
- data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +14907 -0
- data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +2553 -0
- data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +5999 -0
- data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +37832 -0
- data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +2321 -0
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +18818 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +11722 -0
- data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
- data/sorbet/rbi/gems/digest@3.1.0.rbi +189 -0
- data/sorbet/rbi/gems/erubi@1.11.0.rbi +140 -0
- data/sorbet/rbi/gems/globalid@1.0.0.rbi +572 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/json@2.6.2.rbi +1548 -0
- data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.18.0.rbi +877 -0
- data/sorbet/rbi/gems/m@1.6.0.rbi +257 -0
- data/sorbet/rbi/gems/marcel@1.0.2.rbi +220 -0
- data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +170 -0
- data/sorbet/rbi/gems/mini_portile2@2.8.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +104 -0
- data/sorbet/rbi/gems/minitest@5.16.2.rbi +2136 -0
- data/sorbet/rbi/gems/mocha@1.14.0.rbi +4177 -0
- data/sorbet/rbi/gems/net-imap@0.2.3.rbi +2147 -0
- data/sorbet/rbi/gems/net-pop@0.1.1.rbi +926 -0
- data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +11 -0
- data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +1108 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +153 -0
- data/sorbet/rbi/gems/nio4r@2.5.8.rbi +292 -0
- data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +6478 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/parser@3.1.2.1.rbi +9029 -0
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +8 -0
- data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
- data/sorbet/rbi/gems/racc@1.6.0.rbi +152 -0
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +953 -0
- data/sorbet/rbi/gems/rack@2.2.4.rbi +5636 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +688 -0
- data/sorbet/rbi/gems/rails@7.0.3.1.rbi +8 -0
- data/sorbet/rbi/gems/railties@7.0.3.1.rbi +3507 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +392 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +2924 -0
- data/sorbet/rbi/gems/rbi@0.0.15.rbi +3007 -0
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +3383 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +4714 -0
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +6961 -0
- data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +2986 -0
- data/sorbet/rbi/gems/{rubocop-shopify@2.0.1.rbi → rubocop-shopify@2.9.0.rbi} +4 -4
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +992 -0
- data/sorbet/rbi/gems/rubocop@1.34.1.rbi +51820 -0
- data/sorbet/rbi/gems/ruby-lsp@0.2.1.rbi +11 -0
- data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +2181 -0
- data/sorbet/rbi/gems/spring@4.0.0.rbi +411 -0
- data/sorbet/rbi/gems/strscan@3.0.4.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +8 -0
- data/sorbet/rbi/gems/tapioca@0.9.2.rbi +3181 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/timeout@0.3.0.rbi +142 -0
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5896 -0
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +48 -0
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +4529 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2582 -0
- data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +993 -0
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +388 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +18242 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +867 -0
- data/sorbet/rbi/shims/psych.rbi +5 -0
- data/sorbet/tapioca/require.rb +2 -3
- metadata +91 -146
- data/.github/probots.yml +0 -2
- data/library.yml +0 -6
- data/service.yml +0 -1
- data/sorbet/rbi/gems/actioncable@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -860
- data/sorbet/rbi/gems/actionmailbox@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -568
- data/sorbet/rbi/gems/actionmailer@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -587
- data/sorbet/rbi/gems/actionpack@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -5314
- data/sorbet/rbi/gems/actiontext@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -699
- data/sorbet/rbi/gems/actionview@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -2515
- data/sorbet/rbi/gems/activejob@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -624
- data/sorbet/rbi/gems/activemodel@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -1248
- data/sorbet/rbi/gems/activerecord@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8363
- data/sorbet/rbi/gems/activestorage@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -876
- data/sorbet/rbi/gems/activesupport@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -3987
- data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -40
- data/sorbet/rbi/gems/commander@4.5.2.rbi +0 -8
- data/sorbet/rbi/gems/concurrent-ruby@1.1.8.rbi +0 -1969
- data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +0 -26
- data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -41
- data/sorbet/rbi/gems/globalid@0.4.2.rbi +0 -178
- data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
- data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -600
- data/sorbet/rbi/gems/loofah@2.9.0.rbi +0 -274
- data/sorbet/rbi/gems/m@1.5.1.rbi +0 -108
- data/sorbet/rbi/gems/marcel@1.0.0.rbi +0 -70
- data/sorbet/rbi/gems/mini_mime@1.0.3.rbi +0 -71
- data/sorbet/rbi/gems/minitest-focus@1.2.1.rbi +0 -8
- data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -544
- data/sorbet/rbi/gems/mocha@1.12.0.rbi +0 -953
- data/sorbet/rbi/gems/nio4r@2.5.7.rbi +0 -90
- data/sorbet/rbi/gems/nokogiri@1.11.2.rbi +0 -1647
- data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -117
- data/sorbet/rbi/gems/parlour@6.0.0.rbi +0 -1272
- data/sorbet/rbi/gems/parser@3.0.0.0.rbi +0 -1745
- data/sorbet/rbi/gems/pry@0.14.0.rbi +0 -8
- data/sorbet/rbi/gems/psych@3.3.2.rbi +0 -24
- data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -57
- data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -335
- data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1718
- data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -213
- data/sorbet/rbi/gems/rails@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8
- data/sorbet/rbi/gems/railties@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -880
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -155
- data/sorbet/rbi/gems/rake@13.0.3.rbi +0 -837
- data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
- data/sorbet/rbi/gems/rexml@3.2.4.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-performance@1.10.2.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.1.rbi +0 -8
- data/sorbet/rbi/gems/rubocop@1.12.0.rbi +0 -8
- data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +0 -168
- data/sorbet/rbi/gems/spoom@1.1.0.rbi +0 -1061
- data/sorbet/rbi/gems/spring@2.1.1.rbi +0 -160
- data/sorbet/rbi/gems/sprockets-rails@3.2.2.rbi +0 -451
- data/sorbet/rbi/gems/sprockets@4.0.2.rbi +0 -1133
- data/sorbet/rbi/gems/tapioca@0.4.19.rbi +0 -603
- data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -893
- data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -566
- data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
- data/sorbet/rbi/gems/websocket-driver@0.7.3.rbi +0 -438
- data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -177
|
@@ -0,0 +1,1108 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
|
|
3
|
+
# DO NOT EDIT MANUALLY
|
|
4
|
+
# This is an autogenerated file for types exported from the `net-smtp` gem.
|
|
5
|
+
# Please instead update this file by running `bin/tapioca gem net-smtp`.
|
|
6
|
+
|
|
7
|
+
# == What is This Library?
|
|
8
|
+
#
|
|
9
|
+
# This library provides functionality to send internet
|
|
10
|
+
# mail via SMTP, the Simple Mail Transfer Protocol. For details of
|
|
11
|
+
# SMTP itself, see [RFC2821] (http://www.ietf.org/rfc/rfc2821.txt).
|
|
12
|
+
#
|
|
13
|
+
# == What is This Library NOT?
|
|
14
|
+
#
|
|
15
|
+
# This library does NOT provide functions to compose internet mails.
|
|
16
|
+
# You must create them by yourself. If you want better mail support,
|
|
17
|
+
# try RubyMail or TMail or search for alternatives in
|
|
18
|
+
# {RubyGems.org}[https://rubygems.org/] or {The Ruby
|
|
19
|
+
# Toolbox}[https://www.ruby-toolbox.com/].
|
|
20
|
+
#
|
|
21
|
+
# FYI: the official documentation on internet mail is: [RFC2822] (http://www.ietf.org/rfc/rfc2822.txt).
|
|
22
|
+
#
|
|
23
|
+
# == Examples
|
|
24
|
+
#
|
|
25
|
+
# === Sending Messages
|
|
26
|
+
#
|
|
27
|
+
# You must open a connection to an SMTP server before sending messages.
|
|
28
|
+
# The first argument is the address of your SMTP server, and the second
|
|
29
|
+
# argument is the port number. Using SMTP.start with a block is the simplest
|
|
30
|
+
# way to do this. This way, the SMTP connection is closed automatically
|
|
31
|
+
# after the block is executed.
|
|
32
|
+
#
|
|
33
|
+
# require 'net/smtp'
|
|
34
|
+
# Net::SMTP.start('your.smtp.server', 25) do |smtp|
|
|
35
|
+
# # Use the SMTP object smtp only in this block.
|
|
36
|
+
# end
|
|
37
|
+
#
|
|
38
|
+
# Replace 'your.smtp.server' with your SMTP server. Normally
|
|
39
|
+
# your system manager or internet provider supplies a server
|
|
40
|
+
# for you.
|
|
41
|
+
#
|
|
42
|
+
# Then you can send messages.
|
|
43
|
+
#
|
|
44
|
+
# msgstr = <<END_OF_MESSAGE
|
|
45
|
+
# From: Your Name <your@mail.address>
|
|
46
|
+
# To: Destination Address <someone@example.com>
|
|
47
|
+
# Subject: test message
|
|
48
|
+
# Date: Sat, 23 Jun 2001 16:26:43 +0900
|
|
49
|
+
# Message-Id: <unique.message.id.string@example.com>
|
|
50
|
+
#
|
|
51
|
+
# This is a test message.
|
|
52
|
+
# END_OF_MESSAGE
|
|
53
|
+
#
|
|
54
|
+
# require 'net/smtp'
|
|
55
|
+
# Net::SMTP.start('your.smtp.server', 25) do |smtp|
|
|
56
|
+
# smtp.send_message msgstr,
|
|
57
|
+
# 'your@mail.address',
|
|
58
|
+
# 'his_address@example.com'
|
|
59
|
+
# end
|
|
60
|
+
#
|
|
61
|
+
# === Closing the Session
|
|
62
|
+
#
|
|
63
|
+
# You MUST close the SMTP session after sending messages, by calling
|
|
64
|
+
# the #finish method:
|
|
65
|
+
#
|
|
66
|
+
# # using SMTP#finish
|
|
67
|
+
# smtp = Net::SMTP.start('your.smtp.server', 25)
|
|
68
|
+
# smtp.send_message msgstr, 'from@address', 'to@address'
|
|
69
|
+
# smtp.finish
|
|
70
|
+
#
|
|
71
|
+
# You can also use the block form of SMTP.start/SMTP#start. This closes
|
|
72
|
+
# the SMTP session automatically:
|
|
73
|
+
#
|
|
74
|
+
# # using block form of SMTP.start
|
|
75
|
+
# Net::SMTP.start('your.smtp.server', 25) do |smtp|
|
|
76
|
+
# smtp.send_message msgstr, 'from@address', 'to@address'
|
|
77
|
+
# end
|
|
78
|
+
#
|
|
79
|
+
# I strongly recommend this scheme. This form is simpler and more robust.
|
|
80
|
+
#
|
|
81
|
+
# === HELO domain
|
|
82
|
+
#
|
|
83
|
+
# In almost all situations, you must provide a third argument
|
|
84
|
+
# to SMTP.start/SMTP#start. This is the domain name which you are on
|
|
85
|
+
# (the host to send mail from). It is called the "HELO domain".
|
|
86
|
+
# The SMTP server will judge whether it should send or reject
|
|
87
|
+
# the SMTP session by inspecting the HELO domain.
|
|
88
|
+
#
|
|
89
|
+
# Net::SMTP.start('your.smtp.server', 25
|
|
90
|
+
# helo: 'mail.from.domain') { |smtp| ... }
|
|
91
|
+
#
|
|
92
|
+
# === SMTP Authentication
|
|
93
|
+
#
|
|
94
|
+
# The Net::SMTP class supports three authentication schemes;
|
|
95
|
+
# PLAIN, LOGIN and CRAM MD5. (SMTP Authentication: [RFC2554])
|
|
96
|
+
# To use SMTP authentication, pass extra arguments to
|
|
97
|
+
# SMTP.start/SMTP#start.
|
|
98
|
+
#
|
|
99
|
+
# # PLAIN
|
|
100
|
+
# Net::SMTP.start('your.smtp.server', 25
|
|
101
|
+
# user: 'Your Account', secret: 'Your Password', authtype: :plain)
|
|
102
|
+
# # LOGIN
|
|
103
|
+
# Net::SMTP.start('your.smtp.server', 25
|
|
104
|
+
# user: 'Your Account', secret: 'Your Password', authtype: :login)
|
|
105
|
+
#
|
|
106
|
+
# # CRAM MD5
|
|
107
|
+
# Net::SMTP.start('your.smtp.server', 25
|
|
108
|
+
# user: 'Your Account', secret: 'Your Password', authtype: :cram_md5)
|
|
109
|
+
#
|
|
110
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:181
|
|
111
|
+
class Net::SMTP < ::Net::Protocol
|
|
112
|
+
# Creates a new Net::SMTP object.
|
|
113
|
+
#
|
|
114
|
+
# +address+ is the hostname or ip address of your SMTP
|
|
115
|
+
# server. +port+ is the port to connect to; it defaults to
|
|
116
|
+
# port 25.
|
|
117
|
+
#
|
|
118
|
+
# If +tls+ is true, enable TLS. The default is false.
|
|
119
|
+
# If +starttls+ is :always, enable STARTTLS, if +:auto+, use STARTTLS when the server supports it,
|
|
120
|
+
# if false, disable STARTTLS.
|
|
121
|
+
#
|
|
122
|
+
# If +tls_verify+ is true, verify the server's certificate. The default is true.
|
|
123
|
+
# If the hostname in the server certificate is different from +address+,
|
|
124
|
+
# it can be specified with +tls_hostname+.
|
|
125
|
+
#
|
|
126
|
+
# Additional SSLContext params can be added to +ssl_context_params+ hash argument and are passed to
|
|
127
|
+
# +OpenSSL::SSL::SSLContext#set_params+
|
|
128
|
+
#
|
|
129
|
+
# +tls_verify: true+ is equivalent to +ssl_context_params: { verify_mode: OpenSSL::SSL::VERIFY_PEER }+.
|
|
130
|
+
# This method does not open the TCP connection. You can use
|
|
131
|
+
# SMTP.start instead of SMTP.new if you want to do everything
|
|
132
|
+
# at once. Otherwise, follow SMTP.new with SMTP#start.
|
|
133
|
+
#
|
|
134
|
+
# @return [SMTP] a new instance of SMTP
|
|
135
|
+
#
|
|
136
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:234
|
|
137
|
+
def initialize(address, port = T.unsafe(nil), tls: T.unsafe(nil), starttls: T.unsafe(nil), tls_verify: T.unsafe(nil), tls_hostname: T.unsafe(nil), ssl_context_params: T.unsafe(nil)); end
|
|
138
|
+
|
|
139
|
+
# The address of the SMTP server to connect to.
|
|
140
|
+
#
|
|
141
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:399
|
|
142
|
+
def address; end
|
|
143
|
+
|
|
144
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:843
|
|
145
|
+
def auth_cram_md5(user, secret); end
|
|
146
|
+
|
|
147
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:832
|
|
148
|
+
def auth_login(user, secret); end
|
|
149
|
+
|
|
150
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:823
|
|
151
|
+
def auth_plain(user, secret); end
|
|
152
|
+
|
|
153
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:817
|
|
154
|
+
def authenticate(user, secret, authtype = T.unsafe(nil)); end
|
|
155
|
+
|
|
156
|
+
# The server capabilities by EHLO response
|
|
157
|
+
#
|
|
158
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:293
|
|
159
|
+
def capabilities; end
|
|
160
|
+
|
|
161
|
+
# true if the EHLO response contains +key+.
|
|
162
|
+
#
|
|
163
|
+
# @return [Boolean]
|
|
164
|
+
#
|
|
165
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:287
|
|
166
|
+
def capable?(key); end
|
|
167
|
+
|
|
168
|
+
# Returns supported authentication methods on this server.
|
|
169
|
+
# You cannot get valid value before opening SMTP session.
|
|
170
|
+
#
|
|
171
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:322
|
|
172
|
+
def capable_auth_types; end
|
|
173
|
+
|
|
174
|
+
# true if server advertises AUTH CRAM-MD5.
|
|
175
|
+
# You cannot get valid value before opening SMTP session.
|
|
176
|
+
#
|
|
177
|
+
# @return [Boolean]
|
|
178
|
+
#
|
|
179
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:309
|
|
180
|
+
def capable_cram_md5_auth?; end
|
|
181
|
+
|
|
182
|
+
# true if server advertises AUTH LOGIN.
|
|
183
|
+
# You cannot get valid value before opening SMTP session.
|
|
184
|
+
#
|
|
185
|
+
# @return [Boolean]
|
|
186
|
+
#
|
|
187
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:303
|
|
188
|
+
def capable_login_auth?; end
|
|
189
|
+
|
|
190
|
+
# true if server advertises AUTH PLAIN.
|
|
191
|
+
# You cannot get valid value before opening SMTP session.
|
|
192
|
+
#
|
|
193
|
+
# @return [Boolean]
|
|
194
|
+
#
|
|
195
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:297
|
|
196
|
+
def capable_plain_auth?; end
|
|
197
|
+
|
|
198
|
+
# true if server advertises STARTTLS.
|
|
199
|
+
# You cannot get valid value before opening SMTP session.
|
|
200
|
+
#
|
|
201
|
+
# @return [Boolean]
|
|
202
|
+
#
|
|
203
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:282
|
|
204
|
+
def capable_starttls?; end
|
|
205
|
+
|
|
206
|
+
# This method sends a message.
|
|
207
|
+
# If +msgstr+ is given, sends it as a message.
|
|
208
|
+
# If block is given, yield a message writer stream.
|
|
209
|
+
# You must write message before the block is closed.
|
|
210
|
+
#
|
|
211
|
+
# # Example 1 (by string)
|
|
212
|
+
# smtp.data(<<EndMessage)
|
|
213
|
+
# From: john@example.com
|
|
214
|
+
# To: betty@example.com
|
|
215
|
+
# Subject: I found a bug
|
|
216
|
+
#
|
|
217
|
+
# Check vm.c:58879.
|
|
218
|
+
# EndMessage
|
|
219
|
+
#
|
|
220
|
+
# # Example 2 (by block)
|
|
221
|
+
# smtp.data {|f|
|
|
222
|
+
# f.puts "From: john@example.com"
|
|
223
|
+
# f.puts "To: betty@example.com"
|
|
224
|
+
# f.puts "Subject: I found a bug"
|
|
225
|
+
# f.puts ""
|
|
226
|
+
# f.puts "Check vm.c:58879."
|
|
227
|
+
# }
|
|
228
|
+
#
|
|
229
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:981
|
|
230
|
+
def data(msgstr = T.unsafe(nil), &block); end
|
|
231
|
+
|
|
232
|
+
# WARNING: This method causes serious security holes.
|
|
233
|
+
# Use this method for only debugging.
|
|
234
|
+
#
|
|
235
|
+
# Set an output stream for debug logging.
|
|
236
|
+
# You must call this before #start.
|
|
237
|
+
#
|
|
238
|
+
# # example
|
|
239
|
+
# smtp = Net::SMTP.new(addr, port)
|
|
240
|
+
# smtp.set_debug_output $stderr
|
|
241
|
+
# smtp.start do |smtp|
|
|
242
|
+
# ....
|
|
243
|
+
# end
|
|
244
|
+
#
|
|
245
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:435
|
|
246
|
+
def debug_output=(arg); end
|
|
247
|
+
|
|
248
|
+
# Disables SMTP/TLS for this object. Must be called before the
|
|
249
|
+
# connection is established to have any effect.
|
|
250
|
+
#
|
|
251
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:349
|
|
252
|
+
def disable_ssl; end
|
|
253
|
+
|
|
254
|
+
# Disables SMTP/TLS (STARTTLS) for this object. Must be called
|
|
255
|
+
# before the connection is established to have any effect.
|
|
256
|
+
#
|
|
257
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:393
|
|
258
|
+
def disable_starttls; end
|
|
259
|
+
|
|
260
|
+
# Disables SMTP/TLS for this object. Must be called before the
|
|
261
|
+
# connection is established to have any effect.
|
|
262
|
+
#
|
|
263
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:349
|
|
264
|
+
def disable_tls; end
|
|
265
|
+
|
|
266
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:921
|
|
267
|
+
def ehlo(domain); end
|
|
268
|
+
|
|
269
|
+
# Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for
|
|
270
|
+
# this object. Must be called before the connection is established
|
|
271
|
+
# to have any effect. +context+ is a OpenSSL::SSL::SSLContext object.
|
|
272
|
+
#
|
|
273
|
+
# @raise [ArgumentError]
|
|
274
|
+
#
|
|
275
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:338
|
|
276
|
+
def enable_ssl(context = T.unsafe(nil)); end
|
|
277
|
+
|
|
278
|
+
# Enables SMTP/TLS (STARTTLS) for this object.
|
|
279
|
+
# +context+ is a OpenSSL::SSL::SSLContext object.
|
|
280
|
+
#
|
|
281
|
+
# @raise [ArgumentError]
|
|
282
|
+
#
|
|
283
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:375
|
|
284
|
+
def enable_starttls(context = T.unsafe(nil)); end
|
|
285
|
+
|
|
286
|
+
# Enables SMTP/TLS (STARTTLS) for this object if server accepts.
|
|
287
|
+
# +context+ is a OpenSSL::SSL::SSLContext object.
|
|
288
|
+
#
|
|
289
|
+
# @raise [ArgumentError]
|
|
290
|
+
#
|
|
291
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:384
|
|
292
|
+
def enable_starttls_auto(context = T.unsafe(nil)); end
|
|
293
|
+
|
|
294
|
+
# Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for
|
|
295
|
+
# this object. Must be called before the connection is established
|
|
296
|
+
# to have any effect. +context+ is a OpenSSL::SSL::SSLContext object.
|
|
297
|
+
#
|
|
298
|
+
# @raise [ArgumentError]
|
|
299
|
+
#
|
|
300
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:338
|
|
301
|
+
def enable_tls(context = T.unsafe(nil)); end
|
|
302
|
+
|
|
303
|
+
# Set whether to use ESMTP or not. This should be done before
|
|
304
|
+
# calling #start. Note that if #start is called in ESMTP mode,
|
|
305
|
+
# and the connection fails due to a ProtocolError, the SMTP
|
|
306
|
+
# object will automatically switch to plain SMTP mode and
|
|
307
|
+
# retry (but not vice versa).
|
|
308
|
+
#
|
|
309
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:275
|
|
310
|
+
def esmtp; end
|
|
311
|
+
|
|
312
|
+
# Set whether to use ESMTP or not. This should be done before
|
|
313
|
+
# calling #start. Note that if #start is called in ESMTP mode,
|
|
314
|
+
# and the connection fails due to a ProtocolError, the SMTP
|
|
315
|
+
# object will automatically switch to plain SMTP mode and
|
|
316
|
+
# retry (but not vice versa).
|
|
317
|
+
#
|
|
318
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:275
|
|
319
|
+
def esmtp=(_arg0); end
|
|
320
|
+
|
|
321
|
+
# Set whether to use ESMTP or not. This should be done before
|
|
322
|
+
# calling #start. Note that if #start is called in ESMTP mode,
|
|
323
|
+
# and the connection fails due to a ProtocolError, the SMTP
|
|
324
|
+
# object will automatically switch to plain SMTP mode and
|
|
325
|
+
# retry (but not vice versa).
|
|
326
|
+
# +true+ if the SMTP object uses ESMTP (which it does by default).
|
|
327
|
+
#
|
|
328
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:275
|
|
329
|
+
def esmtp?; end
|
|
330
|
+
|
|
331
|
+
# Finishes the SMTP session and closes TCP connection.
|
|
332
|
+
# Raises IOError if not started.
|
|
333
|
+
#
|
|
334
|
+
# @raise [IOError]
|
|
335
|
+
#
|
|
336
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:617
|
|
337
|
+
def finish; end
|
|
338
|
+
|
|
339
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:917
|
|
340
|
+
def helo(domain); end
|
|
341
|
+
|
|
342
|
+
# Provide human-readable stringification of class state.
|
|
343
|
+
#
|
|
344
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:264
|
|
345
|
+
def inspect; end
|
|
346
|
+
|
|
347
|
+
# +from_addr+ is +String+ or +Net::SMTP::Address+
|
|
348
|
+
#
|
|
349
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:926
|
|
350
|
+
def mailfrom(from_addr); end
|
|
351
|
+
|
|
352
|
+
# Opens a message writer stream and gives it to the block.
|
|
353
|
+
# The stream is valid only in the block, and has these methods:
|
|
354
|
+
#
|
|
355
|
+
# puts(str = ''):: outputs STR and CR LF.
|
|
356
|
+
# print(str):: outputs STR.
|
|
357
|
+
# printf(fmt, *args):: outputs sprintf(fmt,*args).
|
|
358
|
+
# write(str):: outputs STR and returns the length of written bytes.
|
|
359
|
+
# <<(str):: outputs STR and returns self.
|
|
360
|
+
#
|
|
361
|
+
# If a single CR ("\r") or LF ("\n") is found in the message,
|
|
362
|
+
# it is converted to the CR LF pair. You cannot send a binary
|
|
363
|
+
# message with this method.
|
|
364
|
+
#
|
|
365
|
+
# === Parameters
|
|
366
|
+
#
|
|
367
|
+
# +from_addr+ is a String or Net::SMTP::Address representing the source mail address.
|
|
368
|
+
#
|
|
369
|
+
# +to_addr+ is a String or Net::SMTP::Address or Array of them, representing
|
|
370
|
+
# the destination mail address or addresses.
|
|
371
|
+
#
|
|
372
|
+
# === Example
|
|
373
|
+
#
|
|
374
|
+
# Net::SMTP.start('smtp.example.com', 25) do |smtp|
|
|
375
|
+
# smtp.open_message_stream('from@example.com', ['dest@example.com']) do |f|
|
|
376
|
+
# f.puts 'From: from@example.com'
|
|
377
|
+
# f.puts 'To: dest@example.com'
|
|
378
|
+
# f.puts 'Subject: test message'
|
|
379
|
+
# f.puts
|
|
380
|
+
# f.puts 'This is a test message.'
|
|
381
|
+
# end
|
|
382
|
+
# end
|
|
383
|
+
#
|
|
384
|
+
# === Errors
|
|
385
|
+
#
|
|
386
|
+
# This method may raise:
|
|
387
|
+
#
|
|
388
|
+
# * Net::SMTPServerBusy
|
|
389
|
+
# * Net::SMTPSyntaxError
|
|
390
|
+
# * Net::SMTPFatalError
|
|
391
|
+
# * Net::SMTPUnknownError
|
|
392
|
+
# * Net::ReadTimeout
|
|
393
|
+
# * IOError
|
|
394
|
+
#
|
|
395
|
+
# @raise [IOError]
|
|
396
|
+
#
|
|
397
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:801
|
|
398
|
+
def open_message_stream(from_addr, *to_addrs, &block); end
|
|
399
|
+
|
|
400
|
+
# Seconds to wait while attempting to open a connection.
|
|
401
|
+
# If the connection cannot be opened within this time, a
|
|
402
|
+
# Net::OpenTimeout is raised. The default value is 30 seconds.
|
|
403
|
+
#
|
|
404
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:407
|
|
405
|
+
def open_timeout; end
|
|
406
|
+
|
|
407
|
+
# Seconds to wait while attempting to open a connection.
|
|
408
|
+
# If the connection cannot be opened within this time, a
|
|
409
|
+
# Net::OpenTimeout is raised. The default value is 30 seconds.
|
|
410
|
+
#
|
|
411
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:407
|
|
412
|
+
def open_timeout=(_arg0); end
|
|
413
|
+
|
|
414
|
+
# The port number of the SMTP server to connect to.
|
|
415
|
+
#
|
|
416
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:402
|
|
417
|
+
def port; end
|
|
418
|
+
|
|
419
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1008
|
|
420
|
+
def quit; end
|
|
421
|
+
|
|
422
|
+
# +to_addr+ is +String+ or +Net::SMTP::Address+
|
|
423
|
+
#
|
|
424
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:953
|
|
425
|
+
def rcptto(to_addr); end
|
|
426
|
+
|
|
427
|
+
# @raise [ArgumentError]
|
|
428
|
+
#
|
|
429
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:931
|
|
430
|
+
def rcptto_list(to_addrs); end
|
|
431
|
+
|
|
432
|
+
# Seconds to wait while reading one block (by one read(2) call).
|
|
433
|
+
# If the read(2) call does not complete within this time, a
|
|
434
|
+
# Net::ReadTimeout is raised. The default value is 60 seconds.
|
|
435
|
+
#
|
|
436
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:412
|
|
437
|
+
def read_timeout; end
|
|
438
|
+
|
|
439
|
+
# Set the number of seconds to wait until timing-out a read(2)
|
|
440
|
+
# call.
|
|
441
|
+
#
|
|
442
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:416
|
|
443
|
+
def read_timeout=(sec); end
|
|
444
|
+
|
|
445
|
+
# Opens a message writer stream and gives it to the block.
|
|
446
|
+
# The stream is valid only in the block, and has these methods:
|
|
447
|
+
#
|
|
448
|
+
# puts(str = ''):: outputs STR and CR LF.
|
|
449
|
+
# print(str):: outputs STR.
|
|
450
|
+
# printf(fmt, *args):: outputs sprintf(fmt,*args).
|
|
451
|
+
# write(str):: outputs STR and returns the length of written bytes.
|
|
452
|
+
# <<(str):: outputs STR and returns self.
|
|
453
|
+
#
|
|
454
|
+
# If a single CR ("\r") or LF ("\n") is found in the message,
|
|
455
|
+
# it is converted to the CR LF pair. You cannot send a binary
|
|
456
|
+
# message with this method.
|
|
457
|
+
#
|
|
458
|
+
# === Parameters
|
|
459
|
+
#
|
|
460
|
+
# +from_addr+ is a String or Net::SMTP::Address representing the source mail address.
|
|
461
|
+
#
|
|
462
|
+
# +to_addr+ is a String or Net::SMTP::Address or Array of them, representing
|
|
463
|
+
# the destination mail address or addresses.
|
|
464
|
+
#
|
|
465
|
+
# === Example
|
|
466
|
+
#
|
|
467
|
+
# Net::SMTP.start('smtp.example.com', 25) do |smtp|
|
|
468
|
+
# smtp.open_message_stream('from@example.com', ['dest@example.com']) do |f|
|
|
469
|
+
# f.puts 'From: from@example.com'
|
|
470
|
+
# f.puts 'To: dest@example.com'
|
|
471
|
+
# f.puts 'Subject: test message'
|
|
472
|
+
# f.puts
|
|
473
|
+
# f.puts 'This is a test message.'
|
|
474
|
+
# end
|
|
475
|
+
# end
|
|
476
|
+
#
|
|
477
|
+
# === Errors
|
|
478
|
+
#
|
|
479
|
+
# This method may raise:
|
|
480
|
+
#
|
|
481
|
+
# * Net::SMTPServerBusy
|
|
482
|
+
# * Net::SMTPSyntaxError
|
|
483
|
+
# * Net::SMTPFatalError
|
|
484
|
+
# * Net::SMTPUnknownError
|
|
485
|
+
# * Net::ReadTimeout
|
|
486
|
+
# * IOError
|
|
487
|
+
# obsolete
|
|
488
|
+
#
|
|
489
|
+
# @raise [IOError]
|
|
490
|
+
#
|
|
491
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:801
|
|
492
|
+
def ready(from_addr, *to_addrs, &block); end
|
|
493
|
+
|
|
494
|
+
# Aborts the current mail transaction
|
|
495
|
+
#
|
|
496
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:909
|
|
497
|
+
def rset; end
|
|
498
|
+
|
|
499
|
+
# Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found
|
|
500
|
+
# in the +msgstr+, are converted into the CR LF pair. You cannot send a
|
|
501
|
+
# binary message with this method. +msgstr+ should include both
|
|
502
|
+
# the message headers and body.
|
|
503
|
+
#
|
|
504
|
+
# +from_addr+ is a String or Net::SMTP::Address representing the source mail address.
|
|
505
|
+
#
|
|
506
|
+
# +to_addr+ is a String or Net::SMTP::Address or Array of them, representing
|
|
507
|
+
# the destination mail address or addresses.
|
|
508
|
+
#
|
|
509
|
+
# === Example
|
|
510
|
+
#
|
|
511
|
+
# Net::SMTP.start('smtp.example.com') do |smtp|
|
|
512
|
+
# smtp.send_message msgstr,
|
|
513
|
+
# 'from@example.com',
|
|
514
|
+
# ['dest@example.com', 'dest2@example.com']
|
|
515
|
+
# end
|
|
516
|
+
#
|
|
517
|
+
# Net::SMTP.start('smtp.example.com') do |smtp|
|
|
518
|
+
# smtp.send_message msgstr,
|
|
519
|
+
# Net::SMTP::Address.new('from@example.com', size: 12345),
|
|
520
|
+
# Net::SMTP::Address.new('dest@example.com', notify: :success)
|
|
521
|
+
# end
|
|
522
|
+
#
|
|
523
|
+
# === Errors
|
|
524
|
+
#
|
|
525
|
+
# This method may raise:
|
|
526
|
+
#
|
|
527
|
+
# * Net::SMTPServerBusy
|
|
528
|
+
# * Net::SMTPSyntaxError
|
|
529
|
+
# * Net::SMTPFatalError
|
|
530
|
+
# * Net::SMTPUnknownError
|
|
531
|
+
# * Net::ReadTimeout
|
|
532
|
+
# * IOError
|
|
533
|
+
#
|
|
534
|
+
# @raise [IOError]
|
|
535
|
+
#
|
|
536
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:748
|
|
537
|
+
def send_mail(msgstr, from_addr, *to_addrs); end
|
|
538
|
+
|
|
539
|
+
# Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found
|
|
540
|
+
# in the +msgstr+, are converted into the CR LF pair. You cannot send a
|
|
541
|
+
# binary message with this method. +msgstr+ should include both
|
|
542
|
+
# the message headers and body.
|
|
543
|
+
#
|
|
544
|
+
# +from_addr+ is a String or Net::SMTP::Address representing the source mail address.
|
|
545
|
+
#
|
|
546
|
+
# +to_addr+ is a String or Net::SMTP::Address or Array of them, representing
|
|
547
|
+
# the destination mail address or addresses.
|
|
548
|
+
#
|
|
549
|
+
# === Example
|
|
550
|
+
#
|
|
551
|
+
# Net::SMTP.start('smtp.example.com') do |smtp|
|
|
552
|
+
# smtp.send_message msgstr,
|
|
553
|
+
# 'from@example.com',
|
|
554
|
+
# ['dest@example.com', 'dest2@example.com']
|
|
555
|
+
# end
|
|
556
|
+
#
|
|
557
|
+
# Net::SMTP.start('smtp.example.com') do |smtp|
|
|
558
|
+
# smtp.send_message msgstr,
|
|
559
|
+
# Net::SMTP::Address.new('from@example.com', size: 12345),
|
|
560
|
+
# Net::SMTP::Address.new('dest@example.com', notify: :success)
|
|
561
|
+
# end
|
|
562
|
+
#
|
|
563
|
+
# === Errors
|
|
564
|
+
#
|
|
565
|
+
# This method may raise:
|
|
566
|
+
#
|
|
567
|
+
# * Net::SMTPServerBusy
|
|
568
|
+
# * Net::SMTPSyntaxError
|
|
569
|
+
# * Net::SMTPFatalError
|
|
570
|
+
# * Net::SMTPUnknownError
|
|
571
|
+
# * Net::ReadTimeout
|
|
572
|
+
# * IOError
|
|
573
|
+
#
|
|
574
|
+
# @raise [IOError]
|
|
575
|
+
#
|
|
576
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:748
|
|
577
|
+
def send_message(msgstr, from_addr, *to_addrs); end
|
|
578
|
+
|
|
579
|
+
# Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found
|
|
580
|
+
# in the +msgstr+, are converted into the CR LF pair. You cannot send a
|
|
581
|
+
# binary message with this method. +msgstr+ should include both
|
|
582
|
+
# the message headers and body.
|
|
583
|
+
#
|
|
584
|
+
# +from_addr+ is a String or Net::SMTP::Address representing the source mail address.
|
|
585
|
+
#
|
|
586
|
+
# +to_addr+ is a String or Net::SMTP::Address or Array of them, representing
|
|
587
|
+
# the destination mail address or addresses.
|
|
588
|
+
#
|
|
589
|
+
# === Example
|
|
590
|
+
#
|
|
591
|
+
# Net::SMTP.start('smtp.example.com') do |smtp|
|
|
592
|
+
# smtp.send_message msgstr,
|
|
593
|
+
# 'from@example.com',
|
|
594
|
+
# ['dest@example.com', 'dest2@example.com']
|
|
595
|
+
# end
|
|
596
|
+
#
|
|
597
|
+
# Net::SMTP.start('smtp.example.com') do |smtp|
|
|
598
|
+
# smtp.send_message msgstr,
|
|
599
|
+
# Net::SMTP::Address.new('from@example.com', size: 12345),
|
|
600
|
+
# Net::SMTP::Address.new('dest@example.com', notify: :success)
|
|
601
|
+
# end
|
|
602
|
+
#
|
|
603
|
+
# === Errors
|
|
604
|
+
#
|
|
605
|
+
# This method may raise:
|
|
606
|
+
#
|
|
607
|
+
# * Net::SMTPServerBusy
|
|
608
|
+
# * Net::SMTPSyntaxError
|
|
609
|
+
# * Net::SMTPFatalError
|
|
610
|
+
# * Net::SMTPUnknownError
|
|
611
|
+
# * Net::ReadTimeout
|
|
612
|
+
# * IOError
|
|
613
|
+
# obsolete
|
|
614
|
+
#
|
|
615
|
+
# @raise [IOError]
|
|
616
|
+
#
|
|
617
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:748
|
|
618
|
+
def sendmail(msgstr, from_addr, *to_addrs); end
|
|
619
|
+
|
|
620
|
+
# WARNING: This method causes serious security holes.
|
|
621
|
+
# Use this method for only debugging.
|
|
622
|
+
#
|
|
623
|
+
# Set an output stream for debug logging.
|
|
624
|
+
# You must call this before #start.
|
|
625
|
+
#
|
|
626
|
+
# # example
|
|
627
|
+
# smtp = Net::SMTP.new(addr, port)
|
|
628
|
+
# smtp.set_debug_output $stderr
|
|
629
|
+
# smtp.start do |smtp|
|
|
630
|
+
# ....
|
|
631
|
+
# end
|
|
632
|
+
#
|
|
633
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:435
|
|
634
|
+
def set_debug_output(arg); end
|
|
635
|
+
|
|
636
|
+
# true if this object uses SMTP/TLS (SMTPS).
|
|
637
|
+
#
|
|
638
|
+
# @return [Boolean]
|
|
639
|
+
#
|
|
640
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:329
|
|
641
|
+
def ssl?; end
|
|
642
|
+
|
|
643
|
+
# Hash for additional SSLContext parameters.
|
|
644
|
+
#
|
|
645
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:261
|
|
646
|
+
def ssl_context_params; end
|
|
647
|
+
|
|
648
|
+
# Hash for additional SSLContext parameters.
|
|
649
|
+
#
|
|
650
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:261
|
|
651
|
+
def ssl_context_params=(_arg0); end
|
|
652
|
+
|
|
653
|
+
# :call-seq:
|
|
654
|
+
# start(helo: 'localhost', user: nil, secret: nil, authtype: nil) { |smtp| ... }
|
|
655
|
+
# start(helo = 'localhost', user = nil, secret = nil, authtype = nil) { |smtp| ... }
|
|
656
|
+
#
|
|
657
|
+
# Opens a TCP connection and starts the SMTP session.
|
|
658
|
+
#
|
|
659
|
+
# === Parameters
|
|
660
|
+
#
|
|
661
|
+
# +helo+ is the _HELO_ _domain_ that you'll dispatch mails from; see
|
|
662
|
+
# the discussion in the overview notes.
|
|
663
|
+
#
|
|
664
|
+
# If both of +user+ and +secret+ are given, SMTP authentication
|
|
665
|
+
# will be attempted using the AUTH command. +authtype+ specifies
|
|
666
|
+
# the type of authentication to attempt; it must be one of
|
|
667
|
+
# :login, :plain, and :cram_md5. See the notes on SMTP Authentication
|
|
668
|
+
# in the overview.
|
|
669
|
+
#
|
|
670
|
+
# === Block Usage
|
|
671
|
+
#
|
|
672
|
+
# When this methods is called with a block, the newly-started SMTP
|
|
673
|
+
# object is yielded to the block, and automatically closed after
|
|
674
|
+
# the block call finishes. Otherwise, it is the caller's
|
|
675
|
+
# responsibility to close the session when finished.
|
|
676
|
+
#
|
|
677
|
+
# === Example
|
|
678
|
+
#
|
|
679
|
+
# This is very similar to the class method SMTP.start.
|
|
680
|
+
#
|
|
681
|
+
# require 'net/smtp'
|
|
682
|
+
# smtp = Net::SMTP.new('smtp.mail.server', 25)
|
|
683
|
+
# smtp.start(helo: helo_domain, user: account, secret: password, authtype: authtype) do |smtp|
|
|
684
|
+
# smtp.send_message msgstr, 'from@example.com', ['dest@example.com']
|
|
685
|
+
# end
|
|
686
|
+
#
|
|
687
|
+
# The primary use of this method (as opposed to SMTP.start)
|
|
688
|
+
# is probably to set debugging (#set_debug_output) or ESMTP
|
|
689
|
+
# (#esmtp=), which must be done before the session is
|
|
690
|
+
# started.
|
|
691
|
+
#
|
|
692
|
+
# === Errors
|
|
693
|
+
#
|
|
694
|
+
# If session has already been started, an IOError will be raised.
|
|
695
|
+
#
|
|
696
|
+
# This method may raise:
|
|
697
|
+
#
|
|
698
|
+
# * Net::SMTPAuthenticationError
|
|
699
|
+
# * Net::SMTPServerBusy
|
|
700
|
+
# * Net::SMTPSyntaxError
|
|
701
|
+
# * Net::SMTPFatalError
|
|
702
|
+
# * Net::SMTPUnknownError
|
|
703
|
+
# * Net::OpenTimeout
|
|
704
|
+
# * Net::ReadTimeout
|
|
705
|
+
# * IOError
|
|
706
|
+
#
|
|
707
|
+
# @raise [ArgumentError]
|
|
708
|
+
#
|
|
709
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:584
|
|
710
|
+
def start(*args, helo: T.unsafe(nil), user: T.unsafe(nil), secret: T.unsafe(nil), password: T.unsafe(nil), authtype: T.unsafe(nil)); end
|
|
711
|
+
|
|
712
|
+
# +true+ if the SMTP session has been started.
|
|
713
|
+
#
|
|
714
|
+
# @return [Boolean]
|
|
715
|
+
#
|
|
716
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:525
|
|
717
|
+
def started?; end
|
|
718
|
+
|
|
719
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:913
|
|
720
|
+
def starttls; end
|
|
721
|
+
|
|
722
|
+
# Returns truth value if this object uses STARTTLS.
|
|
723
|
+
# If this object always uses STARTTLS, returns :always.
|
|
724
|
+
# If this object uses STARTTLS when the server support TLS, returns :auto.
|
|
725
|
+
#
|
|
726
|
+
# @return [Boolean]
|
|
727
|
+
#
|
|
728
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:359
|
|
729
|
+
def starttls?; end
|
|
730
|
+
|
|
731
|
+
# true if this object uses STARTTLS.
|
|
732
|
+
#
|
|
733
|
+
# @return [Boolean]
|
|
734
|
+
#
|
|
735
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:364
|
|
736
|
+
def starttls_always?; end
|
|
737
|
+
|
|
738
|
+
# true if this object uses STARTTLS when server advertises STARTTLS.
|
|
739
|
+
#
|
|
740
|
+
# @return [Boolean]
|
|
741
|
+
#
|
|
742
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:369
|
|
743
|
+
def starttls_auto?; end
|
|
744
|
+
|
|
745
|
+
# true if this object uses SMTP/TLS (SMTPS).
|
|
746
|
+
#
|
|
747
|
+
# @return [Boolean]
|
|
748
|
+
#
|
|
749
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:329
|
|
750
|
+
def tls?; end
|
|
751
|
+
|
|
752
|
+
# The hostname for verifying hostname in the server certificatate.
|
|
753
|
+
#
|
|
754
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:258
|
|
755
|
+
def tls_hostname; end
|
|
756
|
+
|
|
757
|
+
# The hostname for verifying hostname in the server certificatate.
|
|
758
|
+
#
|
|
759
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:258
|
|
760
|
+
def tls_hostname=(_arg0); end
|
|
761
|
+
|
|
762
|
+
# If +true+, verify th server's certificate.
|
|
763
|
+
#
|
|
764
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:255
|
|
765
|
+
def tls_verify; end
|
|
766
|
+
|
|
767
|
+
# If +true+, verify th server's certificate.
|
|
768
|
+
#
|
|
769
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:255
|
|
770
|
+
def tls_verify=(_arg0); end
|
|
771
|
+
|
|
772
|
+
private
|
|
773
|
+
|
|
774
|
+
# @return [Boolean]
|
|
775
|
+
#
|
|
776
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:313
|
|
777
|
+
def auth_capable?(type); end
|
|
778
|
+
|
|
779
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:863
|
|
780
|
+
def auth_method(type); end
|
|
781
|
+
|
|
782
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:876
|
|
783
|
+
def base64_encode(str); end
|
|
784
|
+
|
|
785
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:867
|
|
786
|
+
def check_auth_args(user, secret, authtype = T.unsafe(nil)); end
|
|
787
|
+
|
|
788
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1075
|
|
789
|
+
def check_auth_continue(res); end
|
|
790
|
+
|
|
791
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:857
|
|
792
|
+
def check_auth_method(type); end
|
|
793
|
+
|
|
794
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1069
|
|
795
|
+
def check_auth_response(res); end
|
|
796
|
+
|
|
797
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1063
|
|
798
|
+
def check_continue(res); end
|
|
799
|
+
|
|
800
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1057
|
|
801
|
+
def check_response(res); end
|
|
802
|
+
|
|
803
|
+
# CRAM-MD5: [RFC2195]
|
|
804
|
+
#
|
|
805
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:885
|
|
806
|
+
def cram_md5_response(secret, challenge); end
|
|
807
|
+
|
|
808
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:892
|
|
809
|
+
def cram_secret(secret, mask); end
|
|
810
|
+
|
|
811
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1047
|
|
812
|
+
def critical; end
|
|
813
|
+
|
|
814
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:697
|
|
815
|
+
def do_finish; end
|
|
816
|
+
|
|
817
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:685
|
|
818
|
+
def do_helo(helo_domain); end
|
|
819
|
+
|
|
820
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:633
|
|
821
|
+
def do_start(helo_domain, user, secret, authtype); end
|
|
822
|
+
|
|
823
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1031
|
|
824
|
+
def get_response(reqline); end
|
|
825
|
+
|
|
826
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1021
|
|
827
|
+
def getok(reqline); end
|
|
828
|
+
|
|
829
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1160
|
|
830
|
+
def logging(msg); end
|
|
831
|
+
|
|
832
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:680
|
|
833
|
+
def new_internet_message_io(s); end
|
|
834
|
+
|
|
835
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1037
|
|
836
|
+
def recv_response; end
|
|
837
|
+
|
|
838
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:663
|
|
839
|
+
def ssl_socket(socket, context); end
|
|
840
|
+
|
|
841
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:624
|
|
842
|
+
def tcp_socket(address, port); end
|
|
843
|
+
|
|
844
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:667
|
|
845
|
+
def tlsconnect(s, context); end
|
|
846
|
+
|
|
847
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1014
|
|
848
|
+
def validate_line(line); end
|
|
849
|
+
|
|
850
|
+
class << self
|
|
851
|
+
# The default SMTP port number, 25.
|
|
852
|
+
#
|
|
853
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:187
|
|
854
|
+
def default_port; end
|
|
855
|
+
|
|
856
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:205
|
|
857
|
+
def default_ssl_context(ssl_context_params = T.unsafe(nil)); end
|
|
858
|
+
|
|
859
|
+
# The default SMTPS port number, 465.
|
|
860
|
+
#
|
|
861
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:197
|
|
862
|
+
def default_ssl_port; end
|
|
863
|
+
|
|
864
|
+
# The default mail submission port number, 587.
|
|
865
|
+
#
|
|
866
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:192
|
|
867
|
+
def default_submission_port; end
|
|
868
|
+
|
|
869
|
+
# The default SMTPS port number, 465.
|
|
870
|
+
#
|
|
871
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:197
|
|
872
|
+
def default_tls_port; end
|
|
873
|
+
|
|
874
|
+
# :call-seq:
|
|
875
|
+
# start(address, port = nil, helo: 'localhost', user: nil, secret: nil, authtype: nil, tls: false, starttls: :auto, tls_verify: true, tls_hostname: nil, ssl_context_params: nil) { |smtp| ... }
|
|
876
|
+
# start(address, port = nil, helo = 'localhost', user = nil, secret = nil, authtype = nil) { |smtp| ... }
|
|
877
|
+
#
|
|
878
|
+
# Creates a new Net::SMTP object and connects to the server.
|
|
879
|
+
#
|
|
880
|
+
# This method is equivalent to:
|
|
881
|
+
#
|
|
882
|
+
# Net::SMTP.new(address, port).start(helo: helo_domain, user: account, secret: password, authtype: authtype, tls_verify: flag, tls_hostname: hostname, ssl_context_params: nil)
|
|
883
|
+
#
|
|
884
|
+
# === Example
|
|
885
|
+
#
|
|
886
|
+
# Net::SMTP.start('your.smtp.server') do |smtp|
|
|
887
|
+
# smtp.send_message msgstr, 'from@example.com', ['dest@example.com']
|
|
888
|
+
# end
|
|
889
|
+
#
|
|
890
|
+
# === Block Usage
|
|
891
|
+
#
|
|
892
|
+
# If called with a block, the newly-opened Net::SMTP object is yielded
|
|
893
|
+
# to the block, and automatically closed when the block finishes. If called
|
|
894
|
+
# without a block, the newly-opened Net::SMTP object is returned to
|
|
895
|
+
# the caller, and it is the caller's responsibility to close it when
|
|
896
|
+
# finished.
|
|
897
|
+
#
|
|
898
|
+
# === Parameters
|
|
899
|
+
#
|
|
900
|
+
# +address+ is the hostname or ip address of your smtp server.
|
|
901
|
+
#
|
|
902
|
+
# +port+ is the port to connect to; it defaults to port 25.
|
|
903
|
+
#
|
|
904
|
+
# +helo+ is the _HELO_ _domain_ provided by the client to the
|
|
905
|
+
# server (see overview comments); it defaults to 'localhost'.
|
|
906
|
+
#
|
|
907
|
+
# The remaining arguments are used for SMTP authentication, if required
|
|
908
|
+
# or desired. +user+ is the account name; +secret+ is your password
|
|
909
|
+
# or other authentication token; and +authtype+ is the authentication
|
|
910
|
+
# type, one of :plain, :login, or :cram_md5. See the discussion of
|
|
911
|
+
# SMTP Authentication in the overview notes.
|
|
912
|
+
#
|
|
913
|
+
# If +tls+ is true, enable TLS. The default is false.
|
|
914
|
+
# If +starttls+ is :always, enable STARTTLS, if +:auto+, use STARTTLS when the server supports it,
|
|
915
|
+
# if false, disable STARTTLS.
|
|
916
|
+
#
|
|
917
|
+
# If +tls_verify+ is true, verify the server's certificate. The default is true.
|
|
918
|
+
# If the hostname in the server certificate is different from +address+,
|
|
919
|
+
# it can be specified with +tls_hostname+.
|
|
920
|
+
#
|
|
921
|
+
# Additional SSLContext params can be added to +ssl_context_params+ hash argument and are passed to
|
|
922
|
+
# +OpenSSL::SSL::SSLContext#set_params+
|
|
923
|
+
#
|
|
924
|
+
# +tls_verify: true+ is equivalent to +ssl_context_params: { verify_mode: OpenSSL::SSL::VERIFY_PEER }+.
|
|
925
|
+
#
|
|
926
|
+
# === Errors
|
|
927
|
+
#
|
|
928
|
+
# This method may raise:
|
|
929
|
+
#
|
|
930
|
+
# * Net::SMTPAuthenticationError
|
|
931
|
+
# * Net::SMTPServerBusy
|
|
932
|
+
# * Net::SMTPSyntaxError
|
|
933
|
+
# * Net::SMTPFatalError
|
|
934
|
+
# * Net::SMTPUnknownError
|
|
935
|
+
# * Net::OpenTimeout
|
|
936
|
+
# * Net::ReadTimeout
|
|
937
|
+
# * IOError
|
|
938
|
+
#
|
|
939
|
+
# @raise [ArgumentError]
|
|
940
|
+
#
|
|
941
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:511
|
|
942
|
+
def start(address, port = T.unsafe(nil), *args, helo: T.unsafe(nil), user: T.unsafe(nil), secret: T.unsafe(nil), password: T.unsafe(nil), authtype: T.unsafe(nil), tls: T.unsafe(nil), starttls: T.unsafe(nil), tls_verify: T.unsafe(nil), tls_hostname: T.unsafe(nil), ssl_context_params: T.unsafe(nil), &block); end
|
|
943
|
+
end
|
|
944
|
+
end
|
|
945
|
+
|
|
946
|
+
# Address with parametres for MAIL or RCPT command
|
|
947
|
+
#
|
|
948
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1165
|
|
949
|
+
class Net::SMTP::Address
|
|
950
|
+
# :call-seq:
|
|
951
|
+
# initialize(address, parameter, ...)
|
|
952
|
+
#
|
|
953
|
+
# address +String+ or +Net::SMTP::Address+
|
|
954
|
+
# parameter +String+ or +Hash+
|
|
955
|
+
#
|
|
956
|
+
# @return [Address] a new instance of Address
|
|
957
|
+
#
|
|
958
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1176
|
|
959
|
+
def initialize(address, *args, **kw_args); end
|
|
960
|
+
|
|
961
|
+
# mail address [String]
|
|
962
|
+
#
|
|
963
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1167
|
|
964
|
+
def address; end
|
|
965
|
+
|
|
966
|
+
# paramters [Array<String>]
|
|
967
|
+
#
|
|
968
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1169
|
|
969
|
+
def parameters; end
|
|
970
|
+
|
|
971
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1186
|
|
972
|
+
def to_s; end
|
|
973
|
+
end
|
|
974
|
+
|
|
975
|
+
# This class represents a response received by the SMTP server. Instances
|
|
976
|
+
# of this class are created by the SMTP class; they should not be directly
|
|
977
|
+
# created by the user. For more information on SMTP responses, view
|
|
978
|
+
# {Section 4.2 of RFC 5321}[http://tools.ietf.org/html/rfc5321#section-4.2]
|
|
979
|
+
#
|
|
980
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1085
|
|
981
|
+
class Net::SMTP::Response
|
|
982
|
+
# Creates a new instance of the Response class and sets the status and
|
|
983
|
+
# string attributes
|
|
984
|
+
#
|
|
985
|
+
# @return [Response] a new instance of Response
|
|
986
|
+
#
|
|
987
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1094
|
|
988
|
+
def initialize(status, string); end
|
|
989
|
+
|
|
990
|
+
# Returns a hash of the human readable reply text in the response if it
|
|
991
|
+
# is multiple lines. It does not return the first line. The key of the
|
|
992
|
+
# hash is the first word the value of the hash is an array with each word
|
|
993
|
+
# thereafter being a value in the array
|
|
994
|
+
#
|
|
995
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1137
|
|
996
|
+
def capabilities; end
|
|
997
|
+
|
|
998
|
+
# Determines whether the response received was a Positive Intermediate
|
|
999
|
+
# reply (3xx reply code)
|
|
1000
|
+
#
|
|
1001
|
+
# @return [Boolean]
|
|
1002
|
+
#
|
|
1003
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1118
|
|
1004
|
+
def continue?; end
|
|
1005
|
+
|
|
1006
|
+
# Creates a CRAM-MD5 challenge. You can view more information on CRAM-MD5
|
|
1007
|
+
# on Wikipedia: https://en.wikipedia.org/wiki/CRAM-MD5
|
|
1008
|
+
#
|
|
1009
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1129
|
|
1010
|
+
def cram_md5_challenge; end
|
|
1011
|
+
|
|
1012
|
+
# Determines whether there was an error and raises the appropriate error
|
|
1013
|
+
# based on the reply code of the response
|
|
1014
|
+
#
|
|
1015
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1149
|
|
1016
|
+
def exception_class; end
|
|
1017
|
+
|
|
1018
|
+
# The first line of the human readable reply text
|
|
1019
|
+
#
|
|
1020
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1123
|
|
1021
|
+
def message; end
|
|
1022
|
+
|
|
1023
|
+
# The three digit reply code of the SMTP response
|
|
1024
|
+
#
|
|
1025
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1100
|
|
1026
|
+
def status; end
|
|
1027
|
+
|
|
1028
|
+
# Takes the first digit of the reply code to determine the status type
|
|
1029
|
+
#
|
|
1030
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1106
|
|
1031
|
+
def status_type_char; end
|
|
1032
|
+
|
|
1033
|
+
# The human readable reply text of the SMTP response
|
|
1034
|
+
#
|
|
1035
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1103
|
|
1036
|
+
def string; end
|
|
1037
|
+
|
|
1038
|
+
# Determines whether the response received was a Positive Completion
|
|
1039
|
+
# reply (2xx reply code)
|
|
1040
|
+
#
|
|
1041
|
+
# @return [Boolean]
|
|
1042
|
+
#
|
|
1043
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1112
|
|
1044
|
+
def success?; end
|
|
1045
|
+
|
|
1046
|
+
class << self
|
|
1047
|
+
# Parses the received response and separates the reply code and the human
|
|
1048
|
+
# readable reply text
|
|
1049
|
+
#
|
|
1050
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1088
|
|
1051
|
+
def parse(str); end
|
|
1052
|
+
end
|
|
1053
|
+
end
|
|
1054
|
+
|
|
1055
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:182
|
|
1056
|
+
Net::SMTP::VERSION = T.let(T.unsafe(nil), String)
|
|
1057
|
+
|
|
1058
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:48
|
|
1059
|
+
class Net::SMTPAuthenticationError < ::Net::ProtoAuthError
|
|
1060
|
+
include ::Net::SMTPError
|
|
1061
|
+
end
|
|
1062
|
+
|
|
1063
|
+
# Module mixed in to all SMTP error classes
|
|
1064
|
+
#
|
|
1065
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:31
|
|
1066
|
+
module Net::SMTPError
|
|
1067
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:37
|
|
1068
|
+
def initialize(response, message: T.unsafe(nil)); end
|
|
1069
|
+
|
|
1070
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:42
|
|
1071
|
+
def message; end
|
|
1072
|
+
|
|
1073
|
+
# This *class* is a module for backward compatibility.
|
|
1074
|
+
# In later release, this module becomes a class.
|
|
1075
|
+
#
|
|
1076
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:35
|
|
1077
|
+
def response; end
|
|
1078
|
+
end
|
|
1079
|
+
|
|
1080
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:63
|
|
1081
|
+
class Net::SMTPFatalError < ::Net::ProtoFatalError
|
|
1082
|
+
include ::Net::SMTPError
|
|
1083
|
+
end
|
|
1084
|
+
|
|
1085
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:53
|
|
1086
|
+
class Net::SMTPServerBusy < ::Net::ProtoServerError
|
|
1087
|
+
include ::Net::SMTPError
|
|
1088
|
+
end
|
|
1089
|
+
|
|
1090
|
+
# class SMTP
|
|
1091
|
+
#
|
|
1092
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:1193
|
|
1093
|
+
Net::SMTPSession = Net::SMTP
|
|
1094
|
+
|
|
1095
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:58
|
|
1096
|
+
class Net::SMTPSyntaxError < ::Net::ProtoSyntaxError
|
|
1097
|
+
include ::Net::SMTPError
|
|
1098
|
+
end
|
|
1099
|
+
|
|
1100
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:68
|
|
1101
|
+
class Net::SMTPUnknownError < ::Net::ProtoUnknownError
|
|
1102
|
+
include ::Net::SMTPError
|
|
1103
|
+
end
|
|
1104
|
+
|
|
1105
|
+
# source://net-smtp-0.3.1/lib/net/smtp.rb:73
|
|
1106
|
+
class Net::SMTPUnsupportedCommand < ::Net::ProtocolError
|
|
1107
|
+
include ::Net::SMTPError
|
|
1108
|
+
end
|