Forum: Ruby Problem with net/imap

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ed2af9abb16c6d3c9f5d07cd8f2c8ffd?d=identicon&s=25 Thiago Jackiw (Guest)
on 2006-05-14 13:35
(Received via mailing list)
Hi all,

I've been struggling for the past hour to get just the message text
from the body but I can't figure out, all I get is the entire body which
contains all the headers, etc...

This is what I'm doing...

imap =
imap.authenticate('LOGIN', login, passwd)
imap.uid_fetch(uid, "BODY[]").first.attr["BODY[]"]

Any help would be appreciated.

58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2006-05-15 21:00
(Received via mailing list)
On May 14, 2006, at 4:34 AM, Thiago Jackiw wrote:

> imap.examine('INBOX')
> imap.uid_fetch(uid, "BODY[]").first.attr["BODY[]"]
> Any help would be appreciated.

You want BODY[TEXT].  See RFC 2060:

Eric Hodel - -
This implementation is HODEL-HASH-9600 compliant
Ed2af9abb16c6d3c9f5d07cd8f2c8ffd?d=identicon&s=25 Thiago Jackiw (Guest)
on 2006-05-15 22:05
(Received via mailing list)
Thanks Eric, I had figured out about 20 min after I posted to the
list, but will look at the file you sent.
This topic is locked and can not be replied to.