From: Nedry Date: 2008-09-05T00:00:09+09:00 Subject: Re: IMAP, Gmail & reading the body of the message Neat! I can connect the ruby BBS to Google Mail! On Thu, Sep 4, 2008 at 12:51 PM, Charles Gray wrote: > On Thu, 2008-09-04 at 17:07 +0900, Luis Parravicini wrote: >> On Wed, Sep 3, 2008 at 12:28 PM, Azalar --- wrote: >> > All of the examples I have seen while Googling for this show you how to >> > get headers but none of the sites showed how to read the body of the >> > message. >> > All the messages >> > Could someone explain how I can read my GMail messages via Ruby and IMAP >> > please? >> >> Hi >> >> Use Net::IMAP.fetch ( >> http://www.ruby-doc.org/stdlib/libdoc/net/imap/rdoc/classes/Net/IMAP.html#M001284 >> ) and using something like 'BODY[TEXT]' as the attributes argument to >> fetch. >> For example: >> >> body = imap.fetch(msg.seqno, 'BODY[TEXT]') >> >> Sometimes I use TMail ( http://tmail.rubyforge.org/ ) to parse the >> mail after getting it. >> >> > gmail is pop3 with ssl encoding. > > > -- Peter: I'll handle it, Lois. I read a book about this sort of thing once. Brian: Are you sure it was a book? Are you sure it wasn't nothing? Peter: Oh yeah.