Home All Groups Group Topic Archive Search About
Author
19 Sep 2005 10:10 PM
MMMMM
I just need a simple exchange access method... I know that may be an oxymoron. I want to connect to an Exchange server on another
domain with an already existing account, loop through each message in the Inbox folder, read it, then delete it programatically...
how impossible is this? I appreciate any help.


Here's the very crude pseudo code of what I am looking to do:

UserName = "DOMAIN1\User1"
Password = "XYZ123xyz"
ExchangeServerName = "MSExchSVR001"

Set MailBox1 = ExchangeServerName.Connect UserName, Password   'Set a mailbox object using info provided
For Each Item In MailBox1
    MsgBox MailBox1.Read
    MailBox1.Delete
Next

Author
20 Sep 2005 1:25 PM
Martin
Take a look at Collaboration Data Objects / CDO

http://msdn.microsoft.com/library/en-us/exchanchor/htms/msexchsvr_cdo_top.asp?frame=true

"MMMMM" <noem***@replytogroup.com> schreef in bericht
news:OZEMlbWvFHA.3152@TK2MSFTNGP12.phx.gbl...
> I just need a simple exchange access method... I know that may be an
oxymoron. I want to connect to an Exchange server on another
> domain with an already existing account, loop through each message in the
Inbox folder, read it, then delete it programatically...
> how impossible is this? I appreciate any help.
>
>
> Here's the very crude pseudo code of what I am looking to do:
>
> UserName = "DOMAIN1\User1"
> Password = "XYZ123xyz"
> ExchangeServerName = "MSExchSVR001"
>
> Set MailBox1 = ExchangeServerName.Connect UserName, Password   'Set a
mailbox object using info provided
Show quoteHide quote
> For Each Item In MailBox1
>     MsgBox MailBox1.Read
>     MailBox1.Delete
> Next
>
>