Quantcast
Channel: Knowledge Base: J-Integra : J-Integra for Exchange
Viewing all articles
Browse latest Browse all 13

Search Messages and Appointments by Entry ID

$
0
0
Abstract:

How to Search and Retrieve Messages and Appointments by their Message ID

The following code demonstrates how to search an appointment item by its entry ID. You can apply the same example in searching for other Exchange item types like messages, contacts, task, etc. For more information on message ID's, please refer to the Microsoft CDO reference. Before you run this code, you should first configure CDO.

import com.intrinsyc.cdo.*;import com.linar.jintegra.AuthInfo;public class GetMessageByID {    //TODO: Change the following parameters based on your setup and configuration    static String domain            = "mydomain";    static String user              = "jsmith";    static String password          = "password";    static String CDOmachine        = "0.0.0.0";    static String exchangeServer    = "0.0.0.0";    static String mailbox           = "jsmith";    public static void main (String[] arg ){        try {            // Authenticate to NT domain via NTLM            AuthInfo.setDefault(domain, user, password);            // Start a MAPI Session            Session session = new Session(CDOmachine);            // Logon to the Exchange Server            session.logon(null, null, new Boolean(false), new Boolean(true),                    new Integer(0), new Boolean(true),                    exchangeServer + "
" + mailbox); // Retrieve appointment items from the Calendar Integer folderID = new Integer(CdoDefaultFolderTypes.CdoDefaultFolderCalendar); Folder calendar = new FolderProxy(session.getDefa

Viewing all articles
Browse latest Browse all 13

Trending Articles