Exemplo n.º 1
0
 public SmtpSession(SmtpConnection connection, ISmtpResponderFactory responderFactory)
     : base(connection)
 {
     if (responderFactory == null) throw new ArgumentNullException("responderFactory");
     ResponderFactory = responderFactory;
     SessionInfo = new SmtpSessionInfo();
 }
        public SmtpSessionInfoResponder(ISmtpResponderFactory responderFactory, SmtpSessionInfo sessionInfo)
        {
            if (responderFactory == null) throw new ArgumentNullException("responderFactory");
            if (sessionInfo == null) throw new ArgumentNullException("sessionInfo");

            SessionInfo = sessionInfo;
            _responderFactory = responderFactory;
        }
Exemplo n.º 3
0
 public SmtpSession(SmtpConnection connection, ISmtpResponderFactory responderFactory)
     : base(connection)
 {
     if (responderFactory == null)
     {
         throw new ArgumentNullException("responderFactory");
     }
     ResponderFactory = responderFactory;
     SessionInfo      = new SmtpSessionInfo();
 }
Exemplo n.º 4
0
        public virtual SmtpResponse VerifyIdentification(SmtpSessionInfo sessionInfo, SmtpIdentification smtpIdentification)
        {
            if (smtpIdentification.Mode == SmtpIdentificationMode.HELO)
            {
                return(VerifyHelo());
            }

            if (smtpIdentification.Mode == SmtpIdentificationMode.EHLO)
            {
                return(VerifyEhlo());
            }

            return(new SmtpResponse(500, "Invalid Identification (" + smtpIdentification.Mode + ")"));
        }
Exemplo n.º 5
0
        public SmtpSessionInfoResponder(ISmtpResponderFactory responderFactory, SmtpSessionInfo sessionInfo)
        {
            if (responderFactory == null)
            {
                throw new ArgumentNullException("responderFactory");
            }
            if (sessionInfo == null)
            {
                throw new ArgumentNullException("sessionInfo");
            }

            SessionInfo       = sessionInfo;
            _responderFactory = responderFactory;
        }
Exemplo n.º 6
0
 public SmtpResponse Verify(SmtpSessionInfo sessionInfo, string arguments)
 {
     return(new SmtpResponse(252, "2.5.2 Send some mail, i'll try my best"));
 }
 public SmtpResponse RawLine(SmtpSessionInfo sessionInfo, string line)
 {
     return(SmtpResponse.None);
 }
Exemplo n.º 8
0
 public SmtpResponse VerifyRecipientTo(SmtpSessionInfo sessionInfo, MailAddressWithParameters mailAddressWithParameters)
 {
     return(SmtpResponse.OK);
 }
Exemplo n.º 9
0
 public SmtpResponse Reset(SmtpSessionInfo sessionInfo)
 {
     return(SmtpResponse.OK);
 }
Exemplo n.º 10
0
 public SmtpResponse VerifyMailFrom(SmtpSessionInfo sessionInfo, MailAddressWithParameters mailAddressWithParameters)
 {
     return(SmtpResponse.OK);
 }
Exemplo n.º 11
0
 public SmtpResponse DataEnd(SmtpSessionInfo sessionInfo)
 {
     return SmtpResponse.OK;
 }
Exemplo n.º 12
0
 public SmtpResponse DataLine(SmtpSessionInfo sessionInfo, byte[] lineBuf)
 {
     _mailData.AppendLine(Encoding.UTF8.GetString(lineBuf));
     return SmtpResponse.None;
 }
Exemplo n.º 13
0
 public SmtpResponse DataStart(SmtpSessionInfo sessionInfo)
 {
     return SmtpResponse.DataStart;
 }
 public virtual SmtpResponse DataEnd(SmtpSessionInfo sessionInfo)
 {
     return(SmtpResponse.OK);
 }
 public virtual SmtpResponse DataLine(SmtpSessionInfo sessionInfo, byte[] lineBuf)
 {
     return(SmtpResponse.None);
 }
 public virtual SmtpResponse DataStart(SmtpSessionInfo sessionInfo)
 {
     return(SmtpResponse.DataStart);
 }