login about faq

I've just a simple question: is possible to fetch an email from POP3 without attachment but with the complete body? I've found only methods to get the headers or to get the complete mail, but I've not found a way to fetahc the complete body without the attachments. I want to store the email locally without attachment and download attachment on user request

asked Jun 26 '12 at 18:37

chilkat's gravatar image

chilkat ♦♦
11.8k316358420


This is possible with the IMAP protocol, but not with the POP3 protocol. The POP3 protocol is very simplistic in comparison to IMAP. The reason is that POP3 is intended for the purpose of downloading emails from a remote mailbox and managing the emails locally, whereas IMAP is designed with the intention that emails are going to be kept on the mail server. IMAP provides many more features for this purpose, including the ability to create/manage mailboxes, hierarchies of mailboxes, set flags, download attachments-only, move email from one mailbox to another, etc. POP3 provides none of these features. There is only an INBOX with POP3.

If you examine the POP3 protocol specification (RFC 1081) you'll find that there are only two commands for downloading an email: RETR and TOP. The RETR command downloads the entire email. The response to RETR is the complete MIME source of the email, which includes all bodies and attachments. The TOP command returns the first N raw lines of the MIME following the header. Therefore, downloading the TOP 100 lines might include only part of the text body, all of it, or maybe all of it and part of the 1st attachment, or maybe even part of the first few attachments.

In summary, Chilkat Email (POP3) cannot do what you are asking because the functionality is not available in the POP3 protocol itself. The IMAP protocol provides this functionality, and therefore Chilkat IMAP can do it.

For more detailed information about POP3 and the TOP command, see this Chilkat blog post on POP3 headers and attachment info.

link

answered Jun 26 '12 at 18:55

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×60
×18

Asked: Jun 26 '12 at 18:37

Seen: 2,548 times

Last updated: Jun 26 '12 at 18:55

powered by OSQA