How to return user specific message if server deny (wodSmtpServer / wodPop3Server / wodImapServer)
Hi all,
can anyone tell me how to return user specific message if wodsmtpserver denying incoming message.
I use wodsmtpserver to receive users' messages from Exchange.I save statistic information to DB. And I should stop all messages which were not processed.
If my DB is unavailable I set Deny flag in [code]_IwodSmtpServerComEvents.MailFrom[/code] event. And it causes returning of SMTP error: Cannot receive mail from...
Then Exchange sends a Undelivery report to the sender/administrator with Cannot receive mail from... .
But i want Exchange to send something like DB is currently unavailable.
Is there any way to cancel receiving of message on wodsmtpserver side and specify my explanation
Re: How to return user specific message if server
Hi Aleksey,
You can try using SilentDeny instead. Once you set Action to SilentDeny, make sure that you send your custom message (along with error code) and end of line character. I.e:
[code]
Action = SilentDeny
User.Send( 451 I decided to refuse message from ... & vbCrLf )
[/code]
Can you try something like that?
regards,
Damba
Re: How to return user specific message if server
Great! thanks a lot!
It is what need.