Jorge Aguiar
Guest
|
Posted:
Mon Jan 31, 2005 8:10 am Post subject:
How to generate an NDR from a protocol sink ? |
|
|
Hi all,
I've written a protocol sink that fires after the SMTP DATA command is
completed, in order to perform content filtering.
There are some cases when I must accept the DATA command without errors, but
need to send an NDR to some of the message's recipients.
Can anyone please tell me, what is the correct way to tell the SMTP service
that some (not all) of the recipients are to be rejected and sent NDRs ?
I've tried this:
IMailMsgRecipientsBase->PutDWORD( dwRcptIdx, IMMPID_RP_RECIPIENT_FLAGS,
RP_FAILED | RP_DSN_NOTIFY_FAILURE);
IMailMsgRecipientsBase->PutStringA( dwRcptIdx, IMMPID_RP_SMTP_STATUS_STRING,
"550 5.7.1 Message rejected due to objectionable content");
Unfortunately, it only works sometimes (not always).
Any hints ?
Thanks a lot
Jorge
|
|