internal async Task ReplyAsync(SmtpResponse response, CancellationToken cancellationToken) { await WriteLineAsync(string.Format("{0} {1}", (int)response.ReplyCode, response.Message), cancellationToken); await FlushAsync(cancellationToken); }
public override Task ExecuteAsync(SmtpSession context, CancellationToken cancellationToken) { SmtpResponse response = new SmtpResponse(_response.ReplyCode, string.Format("{0}, {1} retry(ies) remaining.", _response.Message, context.RetryCount)); return(context.Stream.ReplyAsync(response, cancellationToken)); }
public InvalidCommand(SmtpResponse response) { _response = response; }
public override Task ExecuteAsync(SmtpSession context, CancellationToken cancellationToken) { SmtpResponse response = new SmtpResponse(SmtpReplyCode.Ok, string.Format("Hello {0}, haven't we met before?", Domain)); return(context.Stream.ReplyAsync(response, cancellationToken)); }