예제 #1
0
 internal async Task ReplyAsync(SmtpResponse response, CancellationToken cancellationToken)
 {
     await WriteLineAsync(string.Format("{0} {1}", (int)response.ReplyCode, response.Message), cancellationToken);
     await FlushAsync(cancellationToken);
 }
예제 #2
0
        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));
        }
예제 #3
0
 public InvalidCommand(SmtpResponse response)
 {
     _response = response;
 }
예제 #4
0
        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));
        }