ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: How can I get the subject of mail
by Jmlover other posts by this author
May 31 2008 10:55PM messages near this date
Re: How can I get the subject of mail | Re: How can I get the subject of mail
On Jun 1, 2:23 am, Craig <cwilli...@[...].net>  wrote:
>  On May 31, 1:46 am, Jmlover <Jmlo...@[...].com> wrote:
> 
>  >     @pop = Net::POP3.new('pop.163.com')
>  >     @pop.start(@username, @password)
> 
>  >     @pop.each_mail do |m|
>  >               # How can I get the subject of mï¼?
>  >         # ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??ã??
>  >         # By m.pop?
>  >     end
> 
>  >     @pop.finish
> 
>  > By the way, can I only get the mail header? How?
> 
>  > Thank you!
> 
>  Here is one way.
> 
>  puts m.pop.scan(/Subject:(.+)$/)
> 
>  Cheers,
> 
>  Craig

Thank you for your reply!
Thread:
Jmlover
Craig
Jmlover
Mike Stok

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved