GetMessageUID Method

Returns Unique-ID (UID) value for a message.

To get the list of all UIDs in the mailbox, use Search method.

strUID = ObjectName.GetMessageUID(MessageNumber)  
Parameters: None 
MessageNumber As Long Ordinal position of the message in the mailbox  
Return value As String If successful, Unique-ID of the message. If an error occurs, empty string will be returned (check ErrCode property for exact error reason).  

Usage example:

Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.POP3")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.POP3")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
If Mailer.Connect("", 110, "MyName", "MyPassword") Then
  If Mailer.MessageCount > 0 Then
    ' Display Unique-ID of the first message
    MsgBox Mailer.GetMessageUID(1)
  End If
End If

See Also:

GetMessageNumberFromUID Method
Search Method

Copyright © 2002-2022, AfterLogic Corporation. All rights reserved.