1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/doc/net/smtp.rd.ja

185 lines
5.9 KiB
Text
Raw Normal View History

=begin
= net/smtp.rb version 1.2.3
== <20><><EFBFBD>Υ<CEA5>֥<EFBFBD><D6A5><EFBFBD><EFBFBD>ˤĤ<CBA4><C4A4><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뤿<EFBFBD><EFBFBD><EFBFBD>Υץ<EFBFBD><EFBFBD>ȥ<EFBFBD><EFBFBD><EFBFBD> SMTP (Simple Mail Transfer Protocol)
<EFBFBD>򰷤<EFBFBD><EFBFBD><EFBFBD>֥<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>إå<EFBFBD><EFBFBD>ʤɥ᡼<EFBFBD><EFBFBD><EFBFBD>Υǡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>򰷤<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȤϤǤ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
SMTP <20>μ<EFBFBD><CEBC><EFBFBD><EFBFBD><EFBFBD> [RFC2821] ((<URL:http://www.ietf.org/rfc/rfc2821.txt>))
<EFBFBD>˴𤤤Ƥ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
== <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
=== <20>Ȥˤ<C8A4><CBA4><EFBFBD><EFBFBD><EFBFBD><E1A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
SMTP <20><><EFBFBD>Ȥäƥ᡼<C6A5><E1A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϤޤ<CFA4> SMTP.start <20>ǥ<EFBFBD><C7A5>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򳫤<EFBFBD><F2B3ABA4>ޤ<EFBFBD><DEA4><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ФΥ<EFBFBD><EFBFBD>ɥ쥹<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>֥<EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD> File.open <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>˽<EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ưŪ<C6B0>ˤ<EFBFBD><CBA4>äƤ<C3A4><C6A4><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ΤǤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD>
require 'net/smtp'
Net::SMTP.start( 'your.smtp.server', 25 ) {|smtp|
# use smtp object only in this block
}
your.smtp.server <20><>Ŭ<EFBFBD>ڤ<EFBFBD> SMTP <20><><EFBFBD><EFBFBD><EFBFBD>ФΥ<D0A4><CEA5>ɥ쥹<C9A5><ECA5B9><EFBFBD>ɤߤ<C9A4><DFA4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>̾<EFBFBD><EFBFBD><EFBFBD> LAN <20>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4>ץ<EFBFBD><D7A5>Х<EFBFBD><D0A5><EFBFBD><EFBFBD><EFBFBD> SMTP <20><><EFBFBD><EFBFBD><EFBFBD>Ф<EFBFBD><D0A4>Ѱդ<D1B0><D5A4>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD>Ϥ<EFBFBD><CFA4>Ǥ<EFBFBD><C7A4><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD>󤬳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD> send_mail <20>ǥ᡼<C7A5><E1A1BC><EFBFBD><EFBFBD>ή<EFBFBD><CEAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>
require 'net/smtp'
Net::SMTP.start( 'your.smtp.server', 25 ) {|smtp|
smtp.send_mail <<EndOfMail, 'your@mail.address', 'to@some.domain'
From: Your Name <your@mail.address>
To: Dest Address <to@some.domain>
Subject: test mail
Date: Sat, 23 Jun 2001 16:26:43 +0900
Message-Id: <unique.message.id.string@some.domain>
This is test mail.
EndOfMail
}
=== <20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><EFBFBD><EFBFBD> SMTP#finish <20><><EFBFBD>Ƥ<EFBFBD><C6A4>ǥ<EFBFBD><C7A5>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD>Ф<EFBFBD><D0A4><EFBFBD>
<EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>File <20>Τ<CEA4><E8A4A6> GC <20><><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD> close <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ⤢<C8A4><E2A4A2><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤȤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> finish <20><><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD>򸫳ݤ<F2B8ABB3><DDA4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>٤Ƹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD>finish <20><>ɬ<EFBFBD><C9AC><EFBFBD>Ƥ<EFBFBD><C6A4>Ǥ<EFBFBD><C7A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ޤ<EFBFBD><EFBFBD>֥<EFBFBD><EFBFBD>å<EFBFBD><EFBFBD>դ<EFBFBD><EFBFBD><EFBFBD> SMTP.start/SMTP#start <20><><EFBFBD>Ȥ<EFBFBD><C8A4>Ⱦ<EFBFBD><C8BE><EFBFBD><EFBFBD><EFBFBD> finish <20><>
<EFBFBD>Ƥ<EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD>ʸ¤<EFBFBD><EFBFBD>֥<EFBFBD><EFBFBD>å<EFBFBD><EFBFBD>դ<EFBFBD><EFBFBD><EFBFBD> start <20><><EFBFBD>Ȥ<EFBFBD><C8A4>Τ<EFBFBD>
<EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
# using SMTP#finish
smtp = Net::SMTP.start( 'your.smtp.server', 25 )
smtp.send_mail mail_string, 'from@address', 'to@address'
smtp.finish
# using block form of SMTP.start
Net::SMTP.start( 'your.smtp.server', 25 ) {|smtp|
smtp.send_mail mail_string, 'from@address', 'to@address'
}
=== ʸ<><CAB8><EFBFBD><EFBFBD><EFBFBD>ʳ<EFBFBD><CAB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ҤȤľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD>(<28>ҥ<EFBFBD><D2A5>ɥ<EFBFBD><C9A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<29><><EFBFBD>Ȥä<C8A4><C3A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
each <20><EFBFBD>åɤ<C3A5><C9A4><EFBFBD><EFBFBD>ä<EFBFBD><C3A4><EFBFBD><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4>ʤ<EFBFBD><CAA4>Ǥ<EFBFBD><C7A4><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>Ǥ<EFBFBD><C7A4>ޤ<EFBFBD><DEA4><EFBFBD>
<EFBFBD>ʲ<EFBFBD><EFBFBD><EFBFBD> File <20><><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD>ľ<EFBFBD><C4BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>
require 'net/smtp'
Net::SMTP.start( 'your.smtp.server', 25 ) {|smtp|
File.open( 'Mail/draft/1' ) {|f|
smtp.send_mail f, 'your@mail.address', 'to@some.domain'
}
}
=== Hello <20>ɥᥤ<C9A5><E1A5A4>
SMTP <20>Ǥϥ᡼<CFA5><E1A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¦<EFBFBD>Υۥ<CEA5><DBA5>Ȥ<EFBFBD>̾<EFBFBD><CCBE><EFBFBD><EFBFBD><EFBFBD>׵ᤵ<D7B5><E1A4B5><EFBFBD><EFBFBD><EFBFBD>ΤǤ<CEA4><C7A4><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>åפʤɤξ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϼ<EFBFBD>ʬ<EFBFBD>Υޥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŭ<EFBFBD><EFBFBD> SMTP <20><><EFBFBD><EFBFBD><EFBFBD>Ф<EFBFBD>̾<EFBFBD><CCBE><EFBFBD>ʤɤ<CAA4>Ϳ<EFBFBD><CDBF><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD>
<EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>SMTP.start <20><><EFBFBD><EFBFBD><EBA4A4> SMTP#start
<EFBFBD>ΰ<EFBFBD><EFBFBD><EFBFBD> helo_domain <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>
Net::SMTP.start( 'your.smtp.server', 25,
'mail.from.domain' ) {|smtp|
== class Net::SMTP
=== <20><><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD>
: new( address, port = 25 )
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SMTP <20><><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>address <20><>SMTP<54><50><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD>FQDN<44>ǡ<EFBFBD>
port <20><><EFBFBD><EFBFBD>³<EFBFBD><C2B3><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9>Ǥ<EFBFBD><C7A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<CEA5>åɤǤϤޤ<CFA4><DEA4><EFBFBD>³<EFBFBD>Ϥ<EFBFBD><CFA4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD>
: start( address, port = 25, helo_domain = Socket.gethostname, account = nil, password = nil, authtype = nil )
: start( address, port = 25, helo_domain = Socket.gethostname, account = nil, password = nil, authtype = nil ) {|smtp| .... }
<20>ʲ<EFBFBD><CAB2><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>
Net::SMTP.new(address,port).start(helo_domain,account,password,authtype)
# example
Net::SMTP.start( 'your.smtp.server' ) {
smtp.send_mail mail_string, 'from@mail.address', 'dest@mail.address'
}
=== <20><EFBFBD>å<EFBFBD>
: start( helo_domain = <local host name>, account = nil, password = nil, authtype = nil )
: start( helo_domain = <local host name>, account = nil, password = nil, authtype = nil ) {|smtp| .... }
TCP <20><><EFBFBD>ͥ<EFBFBD><CDA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĥ<EFBFBD>ꡢƱ<EAA1A2><C6B1><EFBFBD><EFBFBD> SMTP <20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򳫻Ϥ<F2B3ABBB><CFA4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΤȤ<CEA4><C8A4><EFBFBD>
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υۥ<CEA5><DBA5>Ȥ<EFBFBD> FQDN <20><> helo_domain <20>˻<EFBFBD><CBBB><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
<20><EFBFBD><E2A4B7><EFBFBD>Ǥ˥<C7A4><CBA5>å<EFBFBD><C3A5><EFBFBD><EFBFBD>󤬳<EFBFBD><F3A4ACB3>Ϥ<EFBFBD><CFA4>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD><EFBFBD> IOError <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
account <20><> password <20><>ξ<EFBFBD><CEBE><EFBFBD><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD><EFBFBD><EFBFBD>줿<EFBFBD><ECA4BF><EFBFBD>硢AUTH <20><><EFBFBD>ޥ<EFBFBD><DEA5>ɤˤ<C9A4><CBA4>ä<EFBFBD>
ǧ<>ڤ<EFBFBD><DAA4>Ԥ<EFBFBD><D4A4>ޤ<EFBFBD><DEA4><EFBFBD>authtype <20>ϻ<EFBFBD><CFBB>Ѥ<EFBFBD><D1A4><EFBFBD>ǧ<EFBFBD>ڤΥ<DAA4><CEA5><EFBFBD><EFBFBD>פǡ<D7A4><C7A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܥ<EFBFBD>
<20><> :plain <20><> :cram_md5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
: active?
SMTP <20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD>󤬳<EFBFBD><F3A4ACB3>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD><EFBFBD>鿿<EFBFBD><E9BFBF>
: address
<20><>³<EFBFBD><C2B3><EFBFBD><EFBFBD>ɥ쥹
: port
<20><>³<EFBFBD><C2B3><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD><EFBFBD>ֹ<EFBFBD>
: open_timeout
: open_timeout=(n)
<20><>³<EFBFBD><C2B3><EFBFBD><EFBFBD><EFBFBD>Ԥĺ<D4A4><C4BA><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>äƤ⥳<C6A4>ͥ<EFBFBD><CDA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<20><><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㳰 TimeoutError <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
: read_timeout
: read_timeout=(n)
<20>ɤߤ<C9A4><DFA4><EFBFBD> (read(1) <20><><EFBFBD><EFBFBD>) <20>ǥ֥<C7A5><D6A5>å<EFBFBD><C3A5><EFBFBD><EFBFBD>Ƥ褤<C6A4><E8A4A4><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>
<20><><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>äƤ<C3A4><C6A4>ɤߤ<C9A4><DFA4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㳰 TimeoutError <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
: finish
SMTP <20><><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><C3A5><EFBFBD><EFBFBD>󳫻<EFBFBD><F3B3ABBB><EFBFBD><EFBFBD>ˤ<EFBFBD><CBA4>Υ<CEA5>åɤ<C3A5>
<20>ƤФ줿<D0A4><ECA4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㳰 IOError <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>
: send_mail( mailsrc, from_addr, *to_addrs )
mailsrc <20><><EFBFBD><EFBFBD><E1A1BC><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>mailsrc <20><> each <20><><EFBFBD>ƥ졼<C6A5><ECA1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<20><><EFBFBD>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥʤ<C8A4><CAA4>ʤ<EFBFBD><CAA4>Ǥ⹽<C7A4><E2B9BD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD> (<28><><EFBFBD>Ȥ<EFBFBD><C8A4><EFBFBD> String <20><> File)<29><>
from_domain <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υ<CEA5><EFBFBD>ɥ쥹 ('...@...'<27>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD>) <20>ǡ<EFBFBD>
to_addrs <20>ˤ<EFBFBD><CBA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ쥹<C9A5><ECA5B9><EFBFBD>¤٤ޤ<D9A4><DEA4><EFBFBD>
# example
Net::SMTP.start( 'your.smtp.server' ) {|smtp|
smtp.send_mail mail_string,
'from@mail.address',
'dest@mail.address' 'dest2@mail.address'
}
: ready( from_addr, *to_addrs ) {|adapter| .... }
<20><EFBFBD><E1A1BC><EFBFBD>񤭤<EFBFBD><F1A4ADA4>ߤν<DFA4><CEBD><EFBFBD><EFBFBD>򤷤<EFBFBD><F2A4B7A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǡ<EFBFBD>write <20><EFBFBD>åɤ<C3A5><C9A4><EFBFBD><EFBFBD>ĥ<EFBFBD><C4A5>֥<EFBFBD><D6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD>
<20>֥<EFBFBD><D6A5>å<EFBFBD><C3A5>ˤ<EFBFBD><CBA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4><EFBFBD>from_addr <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ쥹<C9A5><ECA5B9> to_addrs <20><>
<20><><EFBFBD><EFBFBD><EFBFBD>Υ<CEA5><E1A1BC><EFBFBD>ܥå<DCA5><C3A5><EFBFBD><EFBFBD>Ǥ<EFBFBD><C7A4><EFBFBD>
# example
Net::SMTP.start( 'your.smtp.server', 25 ) {|smtp|
smtp.ready( 'from@mail.addr', 'dest@mail.addr' ) do |adapter|
adapter.write str1
adapter.write str2
adapter.write str3
end
}
== ȯ<><C8AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (SMTP <20><><EFBFBD>٥<EFBFBD><D9A5><EFBFBD>) <20><><EFBFBD><EFBFBD><E9A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ä<EFBFBD><C3A4><EFBFBD><EFBFBD>
<EFBFBD>ʲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
: Net::ProtoSyntaxError
SMTP <20><><EFBFBD>ޥ<EFBFBD><DEA5>ɤι<C9A4>ʸ<EFBFBD>ߥ<EFBFBD>(500<30><30><EFBFBD><EFBFBD>)
: Net::ProtoFatalError
<20><><EFBFBD><EFBFBD>Ū<EFBFBD>ʥ<EFBFBD><CAA5>顼(550<35><30><EFBFBD><EFBFBD>)
: Net::ProtoUnknownError
ͽ<><CDBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><E9A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Х<EFBFBD>
: Net::ProtoServerBusy
<20><><EFBFBD><EFBFBD>Ū<EFBFBD>ʥ<EFBFBD><CAA5>顼(420/450<35><30><EFBFBD><EFBFBD>)
=end