Abstract AIRMail SDK library API use model

 

Please review the model to learn about how to use AIRMail SDK API and lead to a result, operations at these facilities.

 

Variables:

 

 MailboxHandle              dword               // OpenMailbox API return MailboxHandle, all other operation doing with MailboxHandle value 

 

 FolderProperties           TFolderProp      // The Mailbox Folder properties returned here

 MailProperties              TMailProp         // The Mail message properties returned here

 AttachProperties           TAttachProp      // The Attachment properties returned here

 

 FolderIndex                  dword               // For enumerating of all Mailbox Folders

 MailIndex                     dword               // For enumerating of all Mail messages

 AttachIndex                  dword               // For enumerating of all Attachments

 

Code:

 

 MailboxHandle = OpenMailbox(‘full path and file name of mailbox file’)                          // Open mailbox file and return Mailbox Handle

 

 For FolderIndex = 0 to GetFolderCount( MailboxHandle ) - 1 do                                  // Enumerate all folders from 0 to GetMailboxCount – 1 inside mailbox

 {

   GetFolderProp( MailboxHandle, FolderIndex, FolderProperties )                                  // Get properties of each (FolderIndex) folder 

  

   For MailIndex = 0 to FolderProperties.MailCount - 1 do                                               // Enumerate all mail messages inside current (FolderIndex) folder

   {

     GetMailProp( MailboxHandle, FolderIndex, MailIndex, MailProperties )                        // Get properties of each (MailIndex) mail message

 

      For AttachIndex = 0 to GetAttachCount( MailboxHandle, FolderIndex, MailIndex) – 1 do// Enumerate all mail messages inside current (MailIndex) mail message

      {

        GetAttachProp( MailboxHandle, FolderIndex, MailIndex, AttachIndex, AttachProperties)  // Get properties of each (AttachIndex) attachment

      }

   }

 }

 

CloseMailbox( MailboxHandle )                                                                                                // Close mailbox file   

 

 

 

© AIRMail SDK Team 2005-2008, please contact as