Retrieving email message body only via 'net/pop'

Hi,

Is it possible to retrieive just the email message body using ‘net/
pop’ or is there another Ruby POP3 library where you can do this?

All help, code etc appreciated.

On Thu, Mar 08, 2007 at 07:35:10PM +0900, dazzle wrote:

Is it possible to retrieive just the email message body using ‘net/
pop’ or is there another Ruby POP3 library where you can do this?

The POP3 protocol (RFC 1939) has a command to retrieve the headers
without
the body, but not the body without the headers.

If the library offered a way to retrieve just the body, it would still
have
to retrieve the whole lot, and then trim off the head. So you could just
do
that yourself:

headers, body = message.split(/\r\n\r\n/, 2)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs