/// <summary> /// Raises <b>Started</b> event. /// </summary> /// <param name="reply">Default SMTP server reply.</param> /// <returns>Returns SMTP server reply what must be sent to the connected client.</returns> private SMTP_Reply OnStarted(SMTP_Reply reply) { if(this.Started != null){ SMTP_e_Started eArgs = new SMTP_e_Started(this,reply); this.Started(this,eArgs); return eArgs.Reply; } return reply; }
/// <summary> /// Is called when SMTP server sessions starts session processing. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">Event data.</param> private void m_pSmtpServer_Session_Started(object sender,SMTP_e_Started e) { if(!IsAccessAllowed(Service_enum.SMTP,e.Session.RemoteEndPoint.Address)){ e.Reply = new SMTP_Reply(554,"Your IP address is blocked."); } }