private static SmtpSessionInfoResponder MailFromIdentifiedParseResponder(ISmtpResponderFactory factory = null) { var parseResponder = IdentifiedParseResponder(factory); parseResponder.SessionInfo.MailFrom = MailAddressWithParameters.Parse("test@localhost"); return(parseResponder); }
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; }
private static SmtpSessionInfoResponder IdentifiedParseResponder(ISmtpResponderFactory factory = null) { var parseResponder = DefaultResponder(factory); parseResponder.SessionInfo.Identification.Mode = SmtpIdentificationMode.HELO; parseResponder.SessionInfo.Identification.Arguments = "localhost"; return(parseResponder); }
public SmtpSession(SmtpConnection connection, ISmtpResponderFactory responderFactory) : base(connection) { if (responderFactory == null) { throw new ArgumentNullException("responderFactory"); } ResponderFactory = responderFactory; SessionInfo = new SmtpSessionInfo(); }
public SmtpSession CreateSession(ISmtpResponderFactory responderFactory) { var session = new SmtpSession(this, responderFactory); session.OnSessionDisconnected += (sender, args) => ClientDisconnected(this, new SmtpConnectionEventArgs(this)); Session = session; SessionCreated(this, new SmtpSessionEventArgs(Session)); return session; }
public SmtpSession CreateSession(ISmtpResponderFactory responderFactory) { var session = new SmtpSession(this, responderFactory); session.OnSessionDisconnected += (sender, args) => ClientDisconnected(this, new SmtpConnectionEventArgs(this)); Session = session; SessionCreated(this, new SmtpSessionEventArgs(Session)); return(session); }
public SmtpSessionInfoResponder(ISmtpResponderFactory responderFactory, ISmtpSessionInfo sessionInfo) { if (responderFactory == null) { throw new ArgumentNullException("responderFactory"); } if (sessionInfo == null) { throw new ArgumentNullException("sessionInfo"); } SessionInfo = sessionInfo; _responderFactory = responderFactory; }
private static SmtpSessionInfoResponder RecipientMailFromIdentifiedParseResponder(ISmtpResponderFactory factory = null) { var parseResponder = MailFromIdentifiedParseResponder(factory); parseResponder.SessionInfo.Recipients.Add(MailAddressWithParameters.Parse("test@localhost")); return parseResponder; }
private static SmtpSessionInfoResponder IdentifiedParseResponder(ISmtpResponderFactory factory = null) { var parseResponder = DefaultResponder(factory); parseResponder.SessionInfo.Identification.Mode = SmtpIdentificationMode.HELO; parseResponder.SessionInfo.Identification.Arguments = "localhost"; return parseResponder; }
private static SmtpSessionInfoResponder DefaultResponder(ISmtpResponderFactory factory = null) { return new SmtpSessionInfoResponder(factory ?? new DefaultSmtpResponderFactory<ISmtpServerConfiguration>(new SmtpServerConfiguration()), new SmtpSessionInfo()); }
private static SmtpSessionInfoResponder DefaultResponder(ISmtpResponderFactory factory = null) { return(new SmtpSessionInfoResponder(factory ?? new DefaultSmtpResponderFactory <ISmtpServerConfiguration>(new SmtpServerConfiguration()), new SmtpSessionInfo())); }