Get attachment name without downloading the whole message

478 views Asked by At

I do not find a way to get attachment file name without downloading the whole message using OpenPop.Net

The Pop3Client.GetMessageHeaders do not expose any data about attachments. The Pop3Client.GetMessage(messageNumber) gives attachment data but first download the whole message.

Maybe someone know how to do that?

1

There are 1 answers

0
foens On BEST ANSWER

I am the main developer for OpenPop.Net. If you take a look at the RFC for POP3 you will notice that it is not possible to get information about attachments. To get the message headers, OpenPop.Net current sends the TOP <messagenumber> 0 command to receive headers.

Since attachment headers are located deep inside the message body, I cannot see how any POP3 client should accomplish your requirement.

IMAP is another protocol, and it includes features which allows the IMAP client to get information about each part inside a message. You might want to go in that direction.