wodPop3Server ActiveX Control - Add Method
      
 

Description

Adds new message to collection.


Return Type

A Pop3Message object.  Reference to Pop3Message object that was created.


Syntax

object.Add ([Filename])



The Add Method syntax has these parts:

Part Description
object An expression evaluating to an object of type Pop3Messages.
Filename Optional. A Variant value. Name of the file on disk where message body is stored.

Remarks

Add method will create new instance of Pop3Message object, add it to collection of all messages, and return reference to that object. This method should be used in Connected event, because adding messages (or removing them) later during session is not allowed by Pop3 protocol specification.

If Filename argument isn't specified, new object that is created will contain no message. This means that if you don't fill it up using Body property, user will see this message listed, but it will be zero-sized, and may cause problems with some clients.

You can ignore object returned by this method, because you can access it later through Messages collection. However, if there's any data you need to store in this object, you should store returned reference locally and use it.

If you specify Filename parameter, be sure that file on disk contains only one message. If this is not the case, if that file actually represents mailbox with few messages, use StartPosition and EndPosition properties to specify location of the message in mailbox file.