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; }
public SmtpSession(SmtpConnection connection, ISmtpResponderFactory responderFactory) : base(connection) { if (responderFactory == null) { throw new ArgumentNullException("responderFactory"); } ResponderFactory = responderFactory; SessionInfo = new SmtpSessionInfo(); }
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 + ")")); }
public SmtpSessionInfoResponder(ISmtpResponderFactory responderFactory, SmtpSessionInfo sessionInfo) { if (responderFactory == null) { throw new ArgumentNullException("responderFactory"); } if (sessionInfo == null) { throw new ArgumentNullException("sessionInfo"); } SessionInfo = sessionInfo; _responderFactory = responderFactory; }
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); }
public SmtpResponse VerifyRecipientTo(SmtpSessionInfo sessionInfo, MailAddressWithParameters mailAddressWithParameters) { return(SmtpResponse.OK); }
public SmtpResponse Reset(SmtpSessionInfo sessionInfo) { return(SmtpResponse.OK); }
public SmtpResponse VerifyMailFrom(SmtpSessionInfo sessionInfo, MailAddressWithParameters mailAddressWithParameters) { return(SmtpResponse.OK); }
public SmtpResponse DataEnd(SmtpSessionInfo sessionInfo) { return SmtpResponse.OK; }
public SmtpResponse DataLine(SmtpSessionInfo sessionInfo, byte[] lineBuf) { _mailData.AppendLine(Encoding.UTF8.GetString(lineBuf)); return SmtpResponse.None; }
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); }