wodPop3 ActiveX Control - Attachments Property
      
 

Description

Returns reference to attachments found in the message.


Property type

A Pop3Attachments object.  


Syntax

object.Attachments



The Attachments Property syntax has these parts:

Part Description
object An expression evaluating to an object of type Pop3Msg.

Remarks

Attachments property is used to enumerate and access all the attachments contained in the message.

Actually, this is just a wrapper - no real objects are made for Attachments collection. It is here only to simplify your work with attachments, because attached files are actually stored in subparts of the message. So, when you access Attachments collection, and try to get, for example, it's Count value, wodPop3 will loop through all subparts and will try to find if in any of them is attached file. If such file is found, information about it will be updates in Attachments collection so you can easily save it, get it's filename or type, etc..

One thing pretty important here is cacheing all the information gathered by looping through subparts - at all times. This means, for instance, when Count is read, wodPop3 will find total count of attachments and cache it. This also applies to all other information, such as filename. If you are not interested in some of attachments, wodPop3 will not even access it, thus no memory will be used to storing information about it.

There's one nice thing in this approach. When there's attachment in your message, you will be able to access it using two approaches: as a message part, or as attachment object.

If you access it as a message part, you will see that message part contains readable data that represents encoded file. You can also access headers and locate ones you're interested in, such as encoding type, size, or any additional information.

If you access it as an attachment, wodPop3 will collect all needed information for you, and will allow you to automatically save it.

It's up to you to decide which approach you will use. Why not both, if needed?

This property is available only if complete message was retrieved from the server, not if only headers were retrieved.