summaryrefslogtreecommitdiff
path: root/lib/net/pop.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-18 09:03:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-18 09:03:16 +0000
commit125ca1a11a53810ac311012352f5b0773fc2bbde (patch)
tree2b9ac558373e9742e475be19fed72bfb7924a0f9 /lib/net/pop.rb
parent40a3f601e43a137e56b2c28454ffb6ce79d7ec7e (diff)
19991018
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/pop.rb')
-rw-r--r--lib/net/pop.rb23
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
index c492a4c..547dafb 100644
--- a/lib/net/pop.rb
+++ b/lib/net/pop.rb
@@ -1,6 +1,6 @@
=begin
-= Net module version 1.0.2 reference manual
+= Net module version 1.0.3 reference manual
pop.rb written by Minero Aoki <aamine@dp.u-netsurf.ne.jp>
@@ -167,6 +167,10 @@ Object
@deleted
end
+ def uidl
+ @proto.uidl @num
+ end
+
end
end # POP3Session
@@ -219,6 +223,11 @@ Net::Command
class POP3Command < Command
+ def initialize( sock )
+ @uidl = nil
+ super
+ end
+
=begin
@@ -323,11 +332,19 @@ Net::Command
def dele( num )
- @socket.writeline( sprintf( 'DELE %s', num ) )
+ @socket.writeline( 'DELE ' + num.to_s )
check_reply( SuccessCode )
end
+ def uidl( num )
+ @socket.writeline( 'UIDL ' + num.to_s )
+ rep = check_reply( SuccessCode )
+ uid = rep.msg.split(' ')[1]
+
+ uid
+ end
+
private
@@ -412,7 +429,7 @@ POP3
end
- unless Session::Version == '1.0.2' then
+ unless Session::Version == '1.0.3' then
$stderr.puts "WARNING: wrong version of session.rb & pop.rb"
end