![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi
We are using Outlook 2003 and above & Exchange Server 2003 Is it possible to enumerate messages in an exchange mailbox using Outlook Object Model(c#), from a client machine(not containing exchange, but containing Outlook) ? Also is it possible to do the above without opening Outlook.? Can someone please provide some links to refer to for the same. We are aware that it can be done using Ex-Mapi/CDO. Thanks ! Regards, TT |
Ads |
#2
|
|||
|
|||
![]()
You'd have to at least start Outlook, but you would not need to display any UI to the user. What's the application?
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... Hi We are using Outlook 2003 and above & Exchange Server 2003 Is it possible to enumerate messages in an exchange mailbox using Outlook Object Model(c#), from a client machine(not containing exchange, but containing Outlook) ? Also is it possible to do the above without opening Outlook.? Can someone please provide some links to refer to for the same. We are aware that it can be done using Ex-Mapi/CDO. Thanks ! Regards, TT |
#3
|
|||
|
|||
![]()
Thanks Sue !
Basically, one of the features of our product is to run thru the Exchange MailBox and look for new mails on server and dispaly notification on the user's desktop even before he has opened the Outlook UI. I tried the method you suggested, but it seems to only display messages downloaded from server. Following is the code snippet : ///start of snippet//////////////////// private void ListMessages() { string strMesgs = ""; Microsoft.Office.Interop.Outlook._Application ol = new Microsoft.Office.Interop.Outlook.ApplicationClass( ); Microsoft.Office.Interop.Outlook._NameSpace olns = ol.GetNamespace("MAPI"); olns.Logon("Mapi Profile" , "" , 0, 0); Outlook.MAPIFolder inbox = olns.GetDefaultFolder(Outlook.OlDefaultFolders.olF olderInbox); Outlook.Items unreadMailItems = inbox.Items; foreach (Object omailItem in unreadMailItems) { Outlook.MailItem unreadMailItem =omailItem as Outlook.MailItem; strMesgs+=unreadMailItem.SenderName + "\n"; } MessageBox.Show(strMesgs,"New Mails:"); } ////end of snippet/////////////////////// Can you please pin point what changes i need to do for gettign "new" mails present on Exchange Server but noy yet downloaded to the client machine? Also is there a way to supress the Security Prompt that appears when u try the above method...? regards TT Sue Mosher [MVP-Outlook] wrote: You'd have to at least start Outlook, but you would not need to display any UI to the user. What's the application? -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... Hi We are using Outlook 2003 and above & Exchange Server 2003 Is it possible to enumerate messages in an exchange mailbox using Outlook Object Model(c#), from a client machine(not containing exchange, but containing Outlook) ? Also is it possible to do the above without opening Outlook.? Can someone please provide some links to refer to for the same. We are aware that it can be done using Ex-Mapi/CDO. Thanks ! Regards, TT |
#4
|
|||
|
|||
![]()
If you want to talk directly to the server mailbox, don't use the Outlook object model, use WebDAV; see http://msdn.microsoft.com/exchange/
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... Thanks Sue ! Basically, one of the features of our product is to run thru the Exchange MailBox and look for new mails on server and dispaly notification on the user's desktop even before he has opened the Outlook UI. I tried the method you suggested, but it seems to only display messages downloaded from server. Following is the code snippet : ///start of snippet//////////////////// private void ListMessages() { string strMesgs = ""; Microsoft.Office.Interop.Outlook._Application ol = new Microsoft.Office.Interop.Outlook.ApplicationClass( ); Microsoft.Office.Interop.Outlook._NameSpace olns = ol.GetNamespace("MAPI"); olns.Logon("Mapi Profile" , "" , 0, 0); Outlook.MAPIFolder inbox = olns.GetDefaultFolder(Outlook.OlDefaultFolders.olF olderInbox); Outlook.Items unreadMailItems = inbox.Items; foreach (Object omailItem in unreadMailItems) { Outlook.MailItem unreadMailItem =omailItem as Outlook.MailItem; strMesgs+=unreadMailItem.SenderName + "\n"; } MessageBox.Show(strMesgs,"New Mails:"); } ////end of snippet/////////////////////// Can you please pin point what changes i need to do for gettign "new" mails present on Exchange Server but noy yet downloaded to the client machine? Also is there a way to supress the Security Prompt that appears when u try the above method...? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Name of mailbox (norwegian on one client, english on the other) | Lars-Erik Østerud | Outlook - Installation | 0 | June 19th 06 01:01 PM |
looking for mail server for testing client on local machine | [email protected] | Outlook - General Queries | 2 | May 11th 06 02:57 AM |
Changing mailbox from client to server | Ferbalex | Outlook - Installation | 1 | April 22nd 06 04:18 AM |
Exchange Mailbox server prohibit from sending when reach mailbox size limit | Milly Staples [MVP - Outlook] | Outlook - General Queries | 1 | February 24th 06 06:41 PM |
Adding owa mailbox to Outlook 2003 client?? | Curtdo | Outlook - Installation | 4 | February 21st 06 04:39 AM |