CDO Mail retrieval failing

CDO Mail retrieval failing

Post by Davi » Fri, 13 Jul 2001 08:22:24



I'm trying to access an inbox from Exchange Server 5.5 SP2
through an ASP page.  I'm using the CDONTS Session object
to log into the Exchange server and access the messages.  
The problem is that I'm staring at 50 messages in the
inbox but the asp page returns an empty box.  

Here's the code:

Set objSession = Server.CreateObject("CDONTS.Session")
objSession.LogonSMTP "myname", "myemail"
Set objOutbox = objSession.GetDefaultFolder
(CdoDefaultFolderOutbox)
Set objInbox = objSession.GetDefaultFolder
(CdoDefaultFolderInbox)

If found an article on MSDN saying the GetDefaultFolder
function returns NOTHING if the folder doesn't exist.  But
running that test shows the receiving folder object is
valid and NOT NOTHING.  What am I missing?

Thanks.