Exemplo n.º 1
0
        /// <summary>
        /// Raises <b>MailFrom</b> event.
        /// </summary>
        /// <param name="from">MAIL FROM: value.</param>
        /// <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 OnMailFrom(SMTP_MailFrom from, SMTP_Reply reply)
        {
            if (MailFrom != null)
            {
                SMTP_e_MailFrom eArgs = new SMTP_e_MailFrom(this, from, reply);
                MailFrom(this, eArgs);

                return eArgs.Reply;
            }

            return reply;
        }
Exemplo n.º 2
0
 private void OnSessionMailFrom(object sender, SMTP_e_MailFrom e)
 {
     e.Session.Tag = Regex.Replace(e.MailFrom.Mailbox, "^prvs=[0-9a-zA-Z]+=", "", RegexOptions.Compiled); //Set session mailbox
 }