im trying to write in event sink in VB using ISMTPOnArrival_OnArrival what i want to do, is based on the from email address i want to be able to save an entire email message to a file/database when certin conditions are met. later i'd like to drop the message in the PICKUP folder for normal delivery. thanks, josh
You should be able to get the from address from the urn:schemas:httpmail:fromemail property. As for saving the message you could use the ADODB streams interface to do this eg set stm = objMessage.getstream() stm.savetofile fname http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_cdo_imessage_interface.asp Cheers Glen "josh" wrote in message news:DED3265B-00B6-41AC-A60F-B4CF56807992@microsoft.com... > im trying to write in event sink in VB using ISMTPOnArrival_OnArrival > > what i want to do, is based on the from email address i want to be able to > save an entire email message to a file/database when certin conditions are > met. > > later i'd like to drop the message in the PICKUP folder for normal > delivery. > > thanks, > josh >
thanks for your reply. how about stopping a message for delivery? thanks, josh
To abort delivery of a message in a SMTP event sink use the messagestatus envelope property see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_cdo_schema_smtpenvelope_messagestatus.asp eg Set objFields = objMessage.EnvelopeFields With objFields .Item("http://schemas.microsoft.com/cdo/smtpenvelope/messagestatus").Value = 3 .Update EventStatus = cdoSkipRemainingSinks End With Cheers Glen wrote in message news:1134053631.525302.199350@o13g2000cwo.googlegroups.com... > thanks for your reply. how about stopping a message for delivery? > > > thanks, > josh >