summaryrefslogtreecommitdiffstats
path: root/lib/net/smtp.rb
Commit message (Collapse)AuthorAgeFilesLines
* * lib/net/smtp.rb (Net::SMTP#check_auth_args): should not changematz2009-05-101-1/+1
| | | | | | number of methods for the sake of compatibility. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-061-55/+55
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP::rcptto): fix a typo. a patch fromshyouhei2008-08-041-1/+1
| | | | | | | | Masao Takaku <masao at nii.ac.jp> fix [ruby-dev:35489]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP::start): use 'localhost' instead ofmatz2008-07-031-3/+3
| | | | | | | | 'localhost.localdomain'. [ruby-dev:35333] * lib/net/smtp.rb (Net::SMTP::SMTP.start): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb, lib/net/smtp.rb, lib/net/pop.rb: update URLs of Japanese ↵kazu2008-04-151-1/+1
| | | | | | documents. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_send): allow send/__send__ to call methods of allmatz2007-11-041-1/+1
| | | | | | | | | | visibility again. we no longer provide __send, __send!. * eval.c (rb_invoke_method): new method to honor private visibility. if it's invoked in a function call style, it calls private methods as well (previous 1.9 send behavior). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb, lib/net/smtp.rb, lib/net/pop.rb: hostname shouldgotoyuzo2007-10-081-0/+3
| | | | | | | | | | be verified against server's indentity as persented in the server's certificate. [ruby-dev:31960] * ext/openssl/lib/net/telnets.rb, ext/openssl/lib/net/ftptls.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.matz2007-08-241-1/+1
| | | | | | | | | | * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize): initialize @workdir to stop warning. * lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): replace funcall by send!. other files in the distribution as well. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: CRAM-MD5 authentication did not work. [ruby-dev:30770]aamine2007-05-201-4/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: support automatic STARTTLS.aamine2007-03-051-83/+216
| | | | | | | | | | | * lib/net/smtp.rb: check server advertisement. * lib/net/smtp.rb: introduce new class SMTP::Response. * lib/net/smtp.rb (getok): should not use sprintf. * lib/net/smtp.rb (get_response): ditto. * lib/net/protocol.rb: reduce syntax warning on 1.9. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: reconstruct SMTPS/STARTTLS interface. New interface is ↵aamine2007-03-041-108/+66
| | | | | | | | | | | incompatible from current 1.9 interface at all. * lib/net/smtp.rb: All SSL-related class methods are removed; use instance methods instead. * lib/net/smtp.rb: rename methods: *ssl -> *tls (with alias "ssl"). * lib/net/smtp.rb: rename methods: *tls -> *starttls. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: parameter `to_addrs' might be an Array, .flatten is ↵aamine2006-08-221-1/+1
| | | | | | required. [ruby-dev:29316] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: support SMTP/SSL. Thanks Kazuhiro NISHIYAMA.aamine2006-08-151-157/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | * lib/net/smtp.rb: new method SMTP.use_ssl? * lib/net/smtp.rb: new method SMTP.enable_ssl. * lib/net/smtp.rb: new method SMTP.disable_ssl. * lib/net/smtp.rb: new method SMTP.default_ssl_port. * lib/net/smtp.rb: new method SMTP.default_tls_port. * lib/net/smtp.rb: now SMTP#enable_tls accepts a SSLContext object, instead of a verity and cert. [FEATURE CHANGE] * lib/net/smtp.rb: new method SMTP.ssl_context. * lib/net/smtp.rb: new method SMTP.default_ssl_context. * lib/net/smtp.rb: export SMTP.authenticate. * lib/net/smtp.rb: export SMTP.auth_plain. * lib/net/smtp.rb: export SMTP.auth_login. * lib/net/smtp.rb: export SMTP.auth_cram_md5. * lib/net/smtp.rb: export SMTP.starttls. * lib/net/smtp.rb: export SMTP.helo. * lib/net/smtp.rb: export SMTP.ehlo. * lib/net/smtp.rb: export SMTP.mailfrom. * lib/net/smtp.rb: export SMTP.rcptto. * lib/net/smtp.rb: export SMTP.rcptto_list. * lib/net/smtp.rb: export SMTP.data. * lib/net/smtp.rb: export SMTP.quit. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP::auth_cram_md5): use ord to retrievematz2006-08-091-2/+4
| | | | | | | | bytes from strings. a patch from WATANABE Tetsuya <Tetsuya.WATANABE at nifty.com>. [ruby-dev:29240] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/ftp.rb: ported documentation improvement from 1.8 branchgsinclair2004-05-091-171/+201
| | | | | | | | | | * lib/net/imap.rb: ditto * lib/net/pop.rb: ditto * lib/net/smtp.rb: ditto * lib/net/telnet.rb: ditto git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: merge SMTP-TLS patch. This patch is contributed by ↵aamine2004-04-211-18/+153
| | | | | | Daniel Hob. [ruby-core:02789] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: change coding style: def m( a ) -> def m(a).aamine2004-04-211-28/+27
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * exception message clean-up by Ian Macdonald <ian@caliban.org>.matz2004-03-291-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: spin off https code again.aamine2004-03-061-12/+18
| | | | | | | | | | | | | | * lib/net/https.rb: new file. * ext/openssl/lib/net/https.rb: removed. moved to net/https with modifications. * ext/openssl/lib/net/protocol.rb: removed. merged with net/http. * lib/net/protocol.rb: new class BufferedIO. * lib/net/protocol.rb: InternetMessageIO < BufferedIO. * lib/net/protocol.rb: BufferedIO.new takes an IO. * lib/net/smtp.rb: follow InternetMessageIO's change. * lib/net/pop.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (finish): revert to 1.93.aamine2003-09-291-4/+14
| | | | | | | | | | | | * lib/net/pop.rb (finish): revert to 1.60. * lib/net/smtp.rb (finish): revert to 1.67. * lib/net/http.rb (do_start): ensure to close socket if failed to start session. * lib/net/pop.rb (do_start): ditto. * lib/net/smtp.rb (do_start): ditto. * lib/net/smtp.rb: SMTP#started? wrongly returned false always. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (finish): does not raise IOError even if !started?, to ↵aamine2003-09-291-5/+2
| | | | | | | | | | allow duplicated #finish call. * lib/net/pop.rb (finish): ditto. * lib/net/smtp.rb (finish): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (check_response): AUTH CRAM-MD5 returns 334 response. ↵aamine2003-08-271-1/+1
| | | | | | [ruby-list:38279] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Small changes to documentation; mainly hiding things from RDoc.gsinclair2003-08-211-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RD -> RDoc by William Webbergsinclair2003-08-061-326/+302
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: respond_to? needs 2nd argument. [ruby-talk:77796]aamine2003-08-021-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (send0): do taint check only when $SAFE > 0aamine2003-07-291-3/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: unify coding style.aamine2003-07-291-3/+3
| | | | | | | * lib/net/http.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb (Net::SMTP::send0): add taint check.matz2003-07-291-0/+4
| | | | | | | | | * ruby.h (LLONG_MIN): wrong value. * io.c (rb_f_getc): $stdin may not be IO. [ruby-dev:20973] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: synchronize document with source code.aamine2003-07-021-68/+146
| | | | | | | * lib/net/pop.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: unify SMTP and SMTPCommand.aamine2003-07-021-119/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/net/smtp.rb: new exception class SMTPError. * lib/net/smtp.rb: new exception class SMTPAuthenticationError. * lib/net/smtp.rb: new exception class SMTPServerBusy. * lib/net/smtp.rb: new exception class SMTPSyntaxError. * lib/net/smtp.rb: new exception class SMTPFatalError. * lib/net/smtp.rb: new exception class SMTPUnknownError. * lib/net/smtp.rb: change critical section protect algorithm. * lib/net/smtp.rb (SMTP#do_start): check authentication args before all. * lib/net/smtp.rb: new method send_message (alias send_mail). * lib/net/smtp.rb: new method open_message_stream (alias ready). * lib/net/pop.rb: POPBadResponse is a POPError. * lib/net/pop.rb (POPMail#pop): ban ReadAdapter. * lib/net/pop.rb (POPMail#top): ditto. * lib/net/pop.rb (POP3Command): change critical section protect algorithm. * lib/net/pop.rb (POP3Command#auth): USER and PASS should be one critical block. * lib/net/pop.rb (POP3Command#retr): ban `dest' argument using iterator. * lib/net/pop.rb (POP3Command#top): ditto. * lib/net/protocol.rb: #read_message_to -> #each_message_chunk * lib/net/protocol.rb: #D -> #LOG * lib/net/protocol.rb: #D_off -> #LOG_off * lib/net/protocol.rb: #D_on -> #LOG_on git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: support LOGIN authentication. The patch is contributed ↵aamine2003-05-241-10/+40
| | | | | | by Kazuhiko Izawa. [ruby-talk:78981] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: ESMTP -> SMTP transition wrongly fails.aamine2003-05-041-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/protocol.rb: reintroduce Protocol.protocol_param.aamine2003-05-021-1/+1
| | | | | | | | | * lib/net/http.rb: ditto. * lib/net/pop.rb: ditto. * lib/net/smtp.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/protocol.rb: remove Protocol class.aamine2003-05-021-96/+170
| | | | | | | | | | | | | | | | * lib/net/smtp.rb (SMTP): ditto. * lib/net/pop.rb (POP3): ditto. * lib/net/http.rb (HTTP): ditto. * lib/net/protocol.rb: remove Command class. * lib/net/smtp.rb (SMTPCommand): ditto. * lib/net/pop.rb (POP3Command): ditto. * lib/net/pop.rb: remove APOPCommand class. * lib/net/protocol.rb: remove Code class and its all subclasses. * lib/net/protocol.rb: remove Response class and its all subclasses. * lib/net/pop.rb (POPMail): new method unique_id (alias uidl). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: Digest string wrongly included '\n' when user name is too ↵aamine2003-03-111-2/+3
| | | | | | long (ruby-bugs-ja:PR#404). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/smtp.rb: changes coding style.aamine2002-11-211-36/+41
| | | | | | | | * lib/net/pop.rb: ditto. * lib/net/protocol.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_to_int): default to_int implementaion for everymatz2002-07-291-3/+3
| | | | | | | | | | numeric class. * re.c (rb_reg_quote): initial part of the string was never copied to the quoted string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2002-02-191-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/net/protocol.rb: rename Protocol.port to default_port. * lib/net/smtp.rb: ditto. * lib/net/pop.rb: ditto. * lib/net/http.rb: ditto. * lib/net/protocol.rb: rename BufferedSocket class to InternetMessageIO. * lib/net/smtp.rb: ditto. * lib/net/pop.rb: ditto. * lib/net/http.rb: ditto. * lib/net/protocol.rb: rename InternetMessageIO#write_pendstr to write_message. * lib/net/smtp.rb: ditto. * lib/net/protocol.rb: new method InternetMessageIO#through_message. * lib/net/smtp.rb: ditto. * lib/net/protocol.rb: rename InternetMessageIO#read_pendstr to read_message_to. * lib/net/pop.rb: ditto. * lib/net/protocol.rb: rename InternetMessageIO#read_pendlist to each_list_item * lib/net/pop.rb: ditto. * lib/net/protocol.rb: Now block size is 1024. * lib/net/smtp.rb: new methods SMTP#esmtp? and #esmtp=. * lib/net/http.rb: Using singleton method syntax instead of singleton class clause, to avoid behavior change of class variables in ruby 1.7. * lib/net/http.rb: HTTPResponse class does not inherit from Net::Response. * lib/net/http.rb: devide HTTP#connecting into {begin,end}_transport. * lib/net/http.rb: unused class Accumulator removed. * lib/net/http.rb: Net::HTTP reads response. not HTTPRequest. * lib/net/http.rb: proxy related class-instance-variables are not initialized correctly. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-12-301-98/+98
| | | | | | | | | | | * lib/net/protocol.rb: Protocol#start returns the return value of block. * lib/net/protocol.rb: set timeout limit by default. * lib/net/protocol.rb: new methods WriteAdapter#write, puts, print, printf. * lib/net/http.rb: rename HTTP#get2 to request_get, post2 to request_post ... * lib/net/smtp.rb: should not resolve HELO domain automatically. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-12-131-6/+8
| | | | | | | | | | | | * lib/net/pop.rb: new method Net::POP3.APOP * lib/net/http.rb: set default Content-Type to x-www-form-urlencoded (causes warning) * lib/net/protocol.rb: remove Net::NetPrivate module. * lib/net/smtp.rb: ditto. * lib/net/pop.rb: ditto. * lib/net/http.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-12-091-14/+31
| | | | | | | * lib/net/protocol.rb: calls on_connect before conn_command git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-12-071-3/+2
| | | | | | | | | | | * lib/net/smtp.rb: SMTP.new requires at least one arg. * lib/net/pop.rb: POP.new requires at least one arg. * lib/net/pop.rb: uses "raise *Error.new" instead of simple raise. * lib/net/http.rb: HTTP.new requires at least one arg. * lib/net/http.rb: changes implicit start algolithm. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Reflect the update of the MD5 module which is now Digest::MD5.knu2001-12-011-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-08-171-4/+4
| | | | | | | | | | * lib/net/protocol.rb: Protocol.new requires at least one arg. * lib/net/smtp.rb: ditto. * lib/net/pop.rb: ditto. * lib/net/http.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-07-081-1/+1
| | | | | | | | * lib/net/http.rb: rename HTTP#request_by_name to send_request. * lib/net/protocol.rb (ProtoSocket#read): modify typo. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-07-031-2/+2
| | | | | | | | | | * lib/net/http.rb (HTTP#request_by_name): bug fix. * lib/net/http.rb: does not write Connection: by default. * lib/net/protocol.rb: "start" for started protocol is an error. * lib/net/protocol.rb: "finish" for finished protocol is an error. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-07-031-1/+1
| | | | | | | | * lib/net/http.rb: new method HTTP#request_by_name (test) * lib/net/http.rb: new class HTTPGenericRequest git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * protocol.rb,smtp.rb,pop.rb,http.rb: modify document.aamine2001-06-271-68/+68
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-06-261-48/+155
| | | | | | | | | | * lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only * lib/net/http.rb: HTTP.Proxy returns self if ADDRESS is nil. * lib/net/protocol.rb: new method ProtocolError#response * lib/net/protocol.rb,smtp.rb,pop.rb,http.rb: add document. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aamineaamine2001-03-131-5/+8
| | | | | | | | | * lib/net/http.rb: add HTTPRequest#basic_auth. * lib/net/smtp.rb: raise if only account or password is given. * lib/net/protocol.rb: WriteAdapter#<< returns self. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e