A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Connecting to Exchange mailbox from client machine using OOM



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 13th 06, 10:48 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 13
Default Connecting to Exchange mailbox from client machine using OOM

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  
Old July 13th 06, 12:18 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Connecting to Exchange mailbox from client machine using OOM

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  
Old July 14th 06, 12:00 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 13
Default Connecting to Exchange mailbox from client machine using OOM

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  
Old July 14th 06, 12:12 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Connecting to Exchange mailbox from client machine using OOM

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 03:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.