Unseen Property
Gets the ordinal message number (in 1 : MessageCount range) of the first unseen message in the
currently selected mailbox.
If you rather need to get the count of unseen messages (not the position of the first such message), either call IMAP.Search(False, "UNSEEN")
in the currently selected mailbox or IMAP.GetMailboxStatus(MailboxName) in case if you need this for other mailboxes (not necessarily selected).
Value Type: | Long | |
Parameters: | None | |
Remarks: | This property is read-only |
Usage example:
' This sample examines "Inbox" mailbox and displays the ordinal message number of the first unseen message Dim Mailer 'Using visual basic to create object Set Mailer = CreateObject("MailBee.IMAP4") 'Using ASP to create object 'Set Mailer = Server.CreateObject("MailBee.IMAP4") 'In ASP use Response.Write instead of MsgBox Mailer.EnableLogging = True ' Logging helps to discover any problems Mailer.LogFilePath = "C:\Temp\imap4_log.txt" Mailer.LicenseKey = "put your license key here" If Mailer.Connect("mailserver.com", 143, "MyName", "MyPassword") Then If Mailer.ExamineMailbox("Inbox") Then MsgBox Mailer.Unseen & " is the first unread message" End If Mailer.Disconnect Else MsgBox Mailer.ErrDesc End If
See Also:
RecentCount
Property
Search Method
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.