Dart Smtp, Pop, Imap Controls
Get Method
Specifies the message part to be retrieved. The default value is imapContent.
Specifies the message numbers to get. The default is all messages.
Optional String that specifies an undimensioned String or Byte array that will be dynamically expanded and filled with a single message. If not specified or NULL, the Messages property is used as the destination.
Description
Get one or more messages or message parts.
Syntax
Visual Basic
Public Sub Get( _
   Optional ByVal Part As GetConstants = imapGetContent, _
   Optional ByVal MsgSet As String, _
   Optional ByRef Msg As Variant _
) 
Parameters
Part
ValueDescription
imapGetContentRequests retrieval of the complete message for each message in MsgSet.
imapGetFlagsRequests the flags for each message specified in MsgSet.
imapGetHeadersRequests the retrieval of the header fields for each message in the MsgSet.
imapGetPreviewRequests the retrieval of the header fields plus parts information for each message in the MsgSet.
imapGetSizeRequests the size for each message specified in MsgSet.
imapGetUidRequests the message UID label for each message in MsgSet.
Specifies the message part to be retrieved. The default value is imapContent.
MsgSet
Specifies the message numbers to get. The default is all messages.
Msg
Optional String that specifies an undimensioned String or Byte array that will be dynamically expanded and filled with a single message. If not specified or NULL, the Messages property is used as the destination.
Remarks

This method makes it easy to download any or all parts of a set of messages. The default destination for messages is the Messages property.

If provided, MsgSet specifies one or more message numbers in the range from 1 to Count. Each number should be separated with a comma. A range of numbers may be indicated with a lower and upper number separated with a colon. For example, a message set of "1, 5:7, 12" will retrieve 5 messages: 1, 5, 6, 7, and 12.

If the destination is the Messages Collection, this method creates all required Message Objects. If a Message Object exists with the same Attribute property, it is reused. Therefore, you can first get the Size of messages causing creation of a Message Object for each message. Getting the imapGetContent will reuse the Message Objects previously created.

If Msg is specified, MsgSet must reference a single message. If Msg is a buffer and Timeout is 0 (non-blocking), Msg must not go out of scope while the operation completes (the Msg String or Byte array must be global in scope).

Error Codes

This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):

See Also

Mailbox Object  | Mailbox Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic