Create .msg file in SMTP OnArrival Event Sink

Create .msg file in SMTP OnArrival Event Sink

Post by Hannes Eklun » Fri, 03 Jan 2003 03:58:01


I have implemented an OnArrival Event Sink monitoring incoming messages.
I would like to save some of these messages in .msg files.

Now, the only way to create .msg files seems to be using MAPI as described

However in the event sink I have a CDO (for exchange 2000) IMessage
to the message. As I understand it CDO for exchange 2000 and MAPI are
separate things, and CDO for exchange 2000 can only save messages in .eml
which is no good for me.

The only solution to the problem I have come up with is to have the event
sink to
send a copy of the email to a dummy account, and then scan that accounts
inbox using
MAPI, and create the .msg file.

Has anyone any suggestions on other aproaches ?
(like "how to convert a CDO for exchange 2000 IMessage object to a MAPI
or how to convert an .eml file to a .msg file, etc.)




1. Creating an Auto-Reply using CDO OnArrival Event Sink


I am able to trap messages coming in for a particular recipient using a VB
script-based sink, but I'm having trouble setting up a reply back to the
sender and then allowing the sender's message to continue on to the
recipient.  If I try to create a new CDO.Message object the script fails
(how can I debug this failure?).  If I must only use the message object
passed into the SMTPOnArrival_OnArrival function, how would I create a

Many Thanks,

2. XML Content Type converted to attachment

3. SMTP OnArrival Event Sink

4. Directory Import Error

5. SMTP OnArrival Event Sink not working, please help

6. MS Outlook Forms: determining max value for field in datasource. Exchange 98

7. Windows 2000 SMTP OnArrival Transport Event sink

8. Problems sending e-mail to Specific addresses

9. SMTP OnArrival Event Sink

10. OnArrival SMTP Sink event

11. OnArrival-Event-Sink only for external emails ?

12. OnArrival event sink

13. Event Sink and OnArrival