I swear that I had this working, but now it isn't. I have a server that accepts all relay messages and I'm using an event sink to do some custom authentication. When I get a message that has no valid recipients I need to abort delivery of the message. Something is causing the message to be successfully delivered now. When I determine that a message should be aborted I return to the ISMTPOnArrival.OnArrival method and set both of these: EventStatus = CdoEventStatus.cdoSkipRemainingSinks; this.message.EnvelopeFields[MESSAGESTATUS].Value = CdoMessageStat.cdoStatAbortDelivery; At first I thought it could be an open handle, but the abort process takes place so early that I'm not accessing any parts of the message yet. Thanks for looking
Without seeing your code it's hard to tell much. I suspect there is some sort of error occuring before you hit this point. John Fenton "David A. Coursey" wrote in message news:5E85509D-4A05-47D9-8DD8-FD85774ECDFD@microsoft.com... >I swear that I had this working, but now it isn't. I have a server that > accepts all relay messages and I'm using an event sink to do some custom > authentication. When I get a message that has no valid recipients I need > to > abort delivery of the message. Something is causing the message to be > successfully delivered now. When I determine that a message should be > aborted I return to the ISMTPOnArrival.OnArrival method and set both of > these: > > > EventStatus = CdoEventStatus.cdoSkipRemainingSinks; > this.message.EnvelopeFields[MESSAGESTATUS].Value = > CdoMessageStat.cdoStatAbortDelivery; > > At first I thought it could be an open handle, but the abort process takes > place so early that I'm not accessing any parts of the message yet. > > Thanks for looking