|
 |
asp_cdo thread: Problem with CDONTS message method
Message #1 by "SuperMan" <omaima62@h...> on Wed, 4 Jul 2001 15:19:04
|
|
Hell Friends!
i got anothe problem. This time, with CDONTS.
i tested my code and sent a mail through cdonts.newmail. its working.
But when i try to access my mailbox with cdonts.session and count the
number of messages with its message method. i always gets the total count
of 0 messages, whereas i got a bulk of messages in my mailbox.
Set objSession = server.CreateObject("cdonts.Session")
objSession.LogonSMTP "superman","superman@m..."
set objInbox = objSession.Inbox
set colMsgs = objInbox.Messages
Response.Write "<br>" & colMsgs.count
Note: the userid and email address are valid.
So if you have some idea about that then pls let me know.
Thanks
SuperMan
Message #2 by "Siegfried Weber" <sweber@c...> on Wed, 4 Jul 2001 17:17:47 +0200
|
|
CDONTS cannot access the inbox of Exchange Server. With the CDONTS
session .Inbox property you just read out the messages that the IIS SMTP
server has stored in his file system.
To access an Exchange Server mailbox you either need to use CDO 1.21 (or
Extended MAPI with C/C++ or Delphi only) or, if you have Exchange 2000
Server, ADO, CDOEX, OLEDB, XML & WebDAV
<Siegfried/>
> -----Original Message-----
> From: SuperMan [mailto:omaima62@h...]
> Sent: Wednesday, July 04, 2001 5:19 PM
> To: ASP CDO
> Subject: [asp_cdo] Problem with CDONTS message method
>
> Hell Friends!
> i got anothe problem. This time, with CDONTS.
> i tested my code and sent a mail through cdonts.newmail. its working.
> But when i try to access my mailbox with cdonts.session and count the
> number of messages with its message method. i always gets the total
count
> of 0 messages, whereas i got a bulk of messages in my mailbox.
>
> Set objSession =3D server.CreateObject("cdonts.Session")
> objSession.LogonSMTP "superman","superman@m..."
>
> set objInbox =3D objSession.Inbox
> set colMsgs =3D objInbox.Messages
>
> Response.Write "<br>" & colMsgs.count
>
> Note: the userid and email address are valid.
>
> So if you have some idea about that then pls let me know.
> Thanks
> SuperMan
>
Message #3 by "SuperMan" <omaima62@h...> on Thu, 5 Jul 2001 06:11:45
|
|
Hi...
Ok...as you told me .. with the inbox property i can read the mails that
are stored on the SMTP server. As i got mails on my mailbox. then why is
it it showing a count of 0 (zero) mails. Plus. just to inform you that . i
got SMTO setupon my Pc. i m runnning windows 2000 professional. and there
is a Windows 2000 Server in my LAN setup where the mail server is
configured tooo. i want to access mail from there. Though i havent got any
mail in the initpub directory on my Local PC. what do u think .. is it
reading the mails from my own PC SMTP mail directory. thats why its
showing a count of zero mails. So i m doing to overcome that .
Please let ne know .
Thanks
SuperMan
> CDONTS cannot access the inbox of Exchange Server. With the CDONTS
> session .Inbox property you just read out the messages that the IIS SMTP
> server has stored in his file system.
>
> To access an Exchange Server mailbox you either need to use CDO 1.21 (or
> Extended MAPI with C/C++ or Delphi only) or, if you have Exchange 2000
> Server, ADO, CDOEX, OLEDB, XML & WebDAV
>
> <Siegfried/>
>
> > -----Original Message-----
> > From: SuperMan [mailto:omaima62@h...]
> > Sent: Wednesday, July 04, 2001 5:19 PM
> > To: ASP CDO
> > Subject: [asp_cdo] Problem with CDONTS message method
> >
> > Hell Friends!
> > i got anothe problem. This time, with CDONTS.
> > i tested my code and sent a mail through cdonts.newmail. its working.
> > But when i try to access my mailbox with cdonts.session and count the
> > number of messages with its message method. i always gets the total
> count
> > of 0 messages, whereas i got a bulk of messages in my mailbox.
> >
> > Set objSession =3D server.CreateObject("cdonts.Session")
> > objSession.LogonSMTP "superman","superman@m..."
> >
> > set objInbox =3D objSession.Inbox
> > set colMsgs =3D objInbox.Messages
> >
> > Response.Write "<br>" & colMsgs.count
> >
> > Note: the userid and email address are valid.
> >
> > So if you have some idea about that then pls let me know.
> > Thanks
> > SuperMan
> >
>
>
Message #4 by "Siegfried Weber" <sweber@c...> on Thu, 5 Jul 2001 11:36:00 +0200
|
|
Inline...
<Siegfried/>
> -----Original Message-----
> From: SuperMan [mailto:omaima62@h...]
> Sent: Thursday, July 05, 2001 8:12 AM
> To: ASP CDO
> Subject: [asp_cdo] RE: Problem with CDONTS message method
>
> Hi...
> Ok...as you told me .. with the inbox property i can read the mails
that
> are stored on the SMTP server. As i got mails on my mailbox. then why
is
> it it showing a count of 0 (zero) mails.
It reads the local SMTP server directory only.
> Plus. just to inform you that . i got SMTO setupon my Pc.
And here your problem starts.
> i m runnning windows 2000 professional. and there
> is a Windows 2000 Server in my LAN setup where the mail server is
> configured tooo.
In this case, you need to run the code on this remote SMTP server.
> i want to access mail from there. Though i havent got any
> mail in the initpub directory on my Local PC.
Right.
> what do u think .. is it reading the mails from my own PC SMTP mail
> directory.
Definitely. The CDOSYS/CDONTS session method reads the messages from the
filesystem on the local machine.
> thats why its showing a count of zero mails.
Yep.
So i m doing to overcome that .
Run the code on the remote SMTP server. Or even better, stop using the
SMTP server for that task and build a real mailbox machine which you can
with valid client protocols (either NT-Mail with POP3/IMAP4 should do
the trick).
|
|
 |