Re: Read inboxes of various mailboxes on Exchange Server
- From: "Henning Krause [MVP - Exhange]" <newsgroup.no@xxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Jun 2005 07:19:51 +0200
Hello,
you can do this with WebDAV.
If you have more than one Exchange server, you must first determine the
correct Exchange Server. See
http://infinitec.de/exchange/howtos/getmailboxurl.aspx on how to this.
If you have only one server, you can skip that part and access the Mailbox
via http://myserver/exchange/<alias>
If you have multiple languages, then the path of your inbox folder differs.
In this case do a PROPFIND on the mailbox root and retrieve the property
"urn:schemas:httpmail:inbox". This property contains the url to the inbox
folde. (See
http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_exch2k_getting_well-known_mailbox_folder_urls.asp
for more on this topic, including an example).
Now that you have the URL, do a SEARCH on that folder (see
http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_exch2k_search_tasks.asp)
and get the emails you need.
You say you have all the username/password credentials... You really don't
need them. There are two possible ways around this: Grant a special user
account the rights "Send As" and "Receive As" on the mailbox store. This way
the useraccount you are using has full access to all mailboxes.
The other way is to use the administrative root. Use an administrator
account and instead of the urls above, use this one:
http://server/exadmin/admin/<full-dns-name>/MBX/<alias>
This url circumvents MAPI access checks and you also have full access to the
mailbox.
This is far better than to have a ton of passwords lying around.
Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)
"Frank" <Frank@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E3E6BC54-2ACB-4003-B38A-A14D3C3C9F7C@xxxxxxxxxxxxxxxx
>I need to create a program in VB6 that read the UNREAD emails located in
>the
> inbox of several mailboxes. I've been given a list of the mailboxes
> names,
> alias, username/password. Basically I need to loop through each mailbox
> and
> read all the UNREAD email items in the INBOX. For each email I need to
> know
> the email subject, message body, recipients, sender, and obtain any
> attachments. This program will NOT be running on the same machine as
> Exchange Server.
>
> I've been reading many articles on using CDO, CDOEx, recordsets with ADO,
> and using WebDAV. Any help, suggestions, or code examples/links would be
> greatly appreciated.
>
> Thank you very much for your time,
>
> Frank
.
- Follow-Ups:
- References:
- Prev by Date: Read inboxes of various mailboxes on Exchange Server
- Next by Date: Problems with Mailboxrights property of the IExchangeMailbox inter
- Previous by thread: Read inboxes of various mailboxes on Exchange Server
- Next by thread: Re: Read inboxes of various mailboxes on Exchange Server
- Index(es):
Relevant Pages
|
Loading