From: Luis Parravicini Date: 2008-09-04T17:07:23+09:00 Subject: Re: IMAP, Gmail & reading the body of the message 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. -- Luis Parravicini http://ktulu.com.ar/blog/