In mail "[ruby-talk:7034] Re: POPMail won't delete messages from the serrver" Aleksi Niemel<aleksi.niemela / cinnober.com> wrote: > > Messages marked 'deleted' will be actually deleted when POP3 > > server get > > 'QUIT' command. > > > > It seems that pop.rb never send 'QUIT' message to POP3 server. > > > I think this is pop.rb 's bug. > > I think you're right. There's even no method in POPMail to call > POP3Command's method quit to send 'QUIT'. No, POP3 send QUIT when POP3#finish is called. The cause is that original source code never call #finish. A typical usage of Net::POP3 is: Net::POP3.start( server ) {|pop| pop.each do |m| # pop mails using m.pop m.delete end } I recommend to call POP3#start (and also SMTP#start, HTTP#start) with block ALWAYS. see also RD document in net/pop.rb. P.S. I decide to add a class method for easy use... Net::POP3.foreach_with_delete( server, nil, account, pass ) do |m| m end Minero Aoki