Author |
|
pinyochit_s Newbie
Joined: 23 June 2004 Location: Thailand
Online Status: Offline Posts: 1
|
Posted: 24 June 2004 at 12:08am | IP Logged
|
|
|
I Would Like To Known How To Examine Only The Records Counts Of Selected Message Such as "UNSEEN",....
IF Possibles Is There Any Method To Do...
IF Not Could You Please To Show Me How To Do ....
Thank You Very Much
Pinyochit Somboonphon
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 24 June 2004 at 8:41am | IP Logged
|
|
|
To examine number of specific messages you can use Search method if IMAP4 object. This method returns array of indices (message numbers or Unique-ID's) of specific messages. Count of elements in this array is a number you are looking for.
Dim objIMAP4, arrUnseen
Set objIMAP4 = CreateObject("MailBee.IMAP4")
objIMAP4.LicenseKey = "license key"
objIMAP4.ServerName = "mail.server.com"
objIMAP4.UserName = "user"
objIMAP4.Password = "pass"
If objIMAP4.Connect Then
If objIMAP4.SelectMailbox("Inbox") Then
' Get message numbers of unseen messages
arrUnseen = objIMAP4.Search(False, "SEEN")
If Not objIMAP4.IsError Then
' Display number of unseen messages
MsgBox UBound(arrUnseen) & " messages"
End If
End If
objIMAP4.Disconnect
End If
|
Back to Top |
|
|