POP3 -> Exchange and CDO?

  • Thread starter Thread starter Chad Myers
  • Start date Start date
C

Chad Myers

I'm looking for an app that would allow me to
download mails from various POP3 accounts and
put them into my Exchange inbox on the server
side (rather than having to have outlook open
to do it all the time).

There are many products that do this, but
they're very expensive considering it's just
for me and just for tinkering.

So I decided I'd try to write my own. I've
found some decent POP3 classes/libraries,
but the problem is, how do I put those mails
into Exchange. I assume that CDO is the
way to go, but I'm not that familiar with it
and not even sure where to start. Every example
I've found shows how to READ from CDO, but not
to write. Perhaps it's not even possible.

I was hoping I could avoid having to rewrite
the headers and all that. Is there a quick
and easy way to just dump raw POP3 message
text into CDO and let Exchange Server/CDO figure
out how to translate it into a MAPI/CDO message
object for display in Outlook?

Thanks,
Chad
 
Hi,

Why you don't get messages with pop3 client and send them with smtp client
exchange server.

Incoming messages are stored always to exchange server's Inbox.

This application can be done with some lines of code.
 
I think that this won't work very well because the
headers will get tampered with. I think I know
how to do it now after having read a little more.

You basically open a session to the Inbox and then
do:
(pseudo-code)

Message msg = inbox.Messages.Add(....);

msg.Subject = popMessage.Subject;
msg.Sender = popMessage.Sender;
....

and then commit the message somehow.

My only concern would be attachments and things
like that. That's what I was hoping someone else
had done this before or had some free utilities
or code to do this.

-c
 
I think that this won't work very well because the
headers will get tampered
It will work, but if you don't like it ...

And besides if exchange server has IMAP installed you can store message to
any folder.
IMAP protocol has APPEND command which allows to to store messages into
folders.
With IMAP you also can move,copy,delete in folders.
 
Back
Top