Re: How can I get the subject of mail
by Craig other posts by this author
May 31 2008 11:30AM messages near this date
How can I get the subject of mail
|
Re: How can I get the subject of mail
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
Thread:
Jmlover
Craig
Jmlover
Mike Stok
|