Пример #1
0
        Task ISmtpMessageChannel.SendReplyAsync(
            SmtpReplyCode smtpReplyCode,
            bool more,
            string message,
            CancellationToken cancellationToken)
        {
            var builder = new StringBuilder();

            builder.Append(((int)smtpReplyCode).ToString("D3"));
            builder.Append(more ? "-" : " ");
            if (message != null)
            {
                builder.Append(message);
            }

            string output = builder.ToString();

            _log.Verbose($"SMTP -> {output}");
            return(_connection.WriteLineAsync(output, Encoding.ASCII, cancellationToken));
        }
Пример #2
0
 public async Task SendContinuationAsync(string text, Encoding encoding, CancellationToken cancellationToken)
 {
     await _connection.WriteLineAsync("+ " + text, encoding, cancellationToken);
 }