Please help - Exchange Sink ignore command
From: Razzie (razzie_at_quicknet.nl)
Date: 09/18/04
- Next message: Evan Dodds [MSFT]: "Re: RPC Operations/Sec High"
- Previous message: Leif Pedersen [MVP]: "Re: Is it possible to reinstall OWA?"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 18 Sep 2004 13:38:40 +0200
Hey all,
I sincerely hope someone can help me with this problem. I asked this in
multiple newsgroups and forum but nobody seems to know?
Anyway, I wrote an Event Sink, using the shieldsup tutorial
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmtps/html/writingmngsinks.asp)
which helped me in the right way.
I changed the tutorial so I listen for the RCPT command. This works ok, I
can read the recipient from the command. If the recipient has a certain
value, I want the email not to be send to that recipient. This works ok for
one recipient - I can throw a COMException and the server will terminate the
session. However, if I would send an email with multiple recipient, I do
not, of course, want the server to completely drop the session and my other
recipient wouldn't get the mail either. So, basically I do not know how to
ignore a command. I tried the following:
- Setting the CommandStatus, for example: Context.CommandStatus = (uint)
ProtocolEventConstants.EXPE_COMPLETE_FAILURE; or EXPE_S_CONSUMED, but it
won't ignore the command, the RCPT TO: command is still processed and the
recipient will still recieve the email.
- Throw COMException, but that always (?) terminates the session, and as I
said before, I don't want that!
- Try to read the MailMsg reference passed through the method, but pMessage
never seems to contain data. For example, the Rfc822FromAddress property is
always null, while I already used the MAIL command. So I can't seem to read
the Recipients from the email and delete the last one.
Does anyone know how I can tell the SMTP server to ignore a command so the
recipient will be discarded? I've been struggling with this for 2 weeks !
now and no luck so far :(
Thanks in advance,
Razzie
- Next message: Evan Dodds [MSFT]: "Re: RPC Operations/Sec High"
- Previous message: Leif Pedersen [MVP]: "Re: Is it possible to reinstall OWA?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|