Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Retrieving email message body only via 'net/pop'

Reply
Thread Tools

Retrieving email message body only via 'net/pop'

 
 
dazzle
Guest
Posts: n/a
 
      03-08-2007
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.

 
Reply With Quote
 
 
 
 
Brian Candler
Guest
Posts: n/a
 
      03-08-2007
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)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
test message only - no text in body Lindsay.Rollo@paradisedotnetdotnz NZ Computing 0 02-16-2009 08:50 PM
Problem recieving the html code via email body. divya ASP .Net 1 09-19-2006 11:53 AM
Pasting JTable content into the body of an email message Marc Van Laer Java 0 04-11-2005 04:13 PM
New OWA message and Modify body of Message - Steve - ASP .Net 0 07-06-2004 04:54 AM
Size of e-mail message - message.Body = msgText =?Utf-8?B?bWc=?= ASP .Net 1 02-11-2004 07:42 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57