Search The ForumSearch   RegisterRegister  LoginLogin

MailBee IMAP4

 AfterLogic Forum : MailBee IMAP4
Subject Topic: Examine Only The Records Count Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
pinyochit_s
Newbie
Newbie


Joined: 23 June 2004
Location: Thailand
Online Status: Offline
Posts: 1
Posted: 24 June 2004 at 12:08am | IP Logged Quote pinyochit_s

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 View pinyochit_s's Profile Search for other posts by pinyochit_s
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2179
Posted: 24 June 2004 at 8:41am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide