User disconnect from any event. - WeOnlyDo Discussion board

User disconnect from any event. (wodSmtpServer / wodPop3Server / wodImapServer)

by ajitpals, Monday, February 08, 2016, 11:46 (2993 days ago) @ Jasmine

No, this is not correct.

If you will use User.Send, then Action should be SilentDeny, otherwise wodSmtpServer will also send a message.

It will not auto-disconnect user. You must give it some spare time for your data to leave the socket. But, there's no specific reason to disconnect him anyway - he can not send new email, he can only try to with new MAIL FROM, where you will intercept it again.

If you wish, you can check in some timer a second later and disconnect the user.

Jasmine.

Hi ,

I have tried following settings as described, in Case any error. I'm calling the following code,


Mail_From Event(){
If(anyError){
Action = SmtpActions.Deny;
return;
}
}

It seems to work and socket is disconnect after 1 - 2 minute in between. But server is still trying 2 connect and send messages? Should send error code in User.Send() like 550, 547? To make sure server, don't make retry.


Thanks,
Ajitpal


Complete thread: