diff --git a/Src/SmtpServer/Protocol/DataCommand.cs b/Src/SmtpServer/Protocol/DataCommand.cs index 0092370..b30ce23 100644 --- a/Src/SmtpServer/Protocol/DataCommand.cs +++ b/Src/SmtpServer/Protocol/DataCommand.cs @@ -58,9 +58,14 @@ await context.Pipe.Input.ReadDotBlockAsync( await context.Pipe.Output.WriteReplyAsync(response, cancellationToken).ConfigureAwait(false); } + catch (SmtpResponseException) + { + return false; + } catch (Exception) { await context.Pipe.Output.WriteReplyAsync(new SmtpResponse(SmtpReplyCode.TransactionFailed), cancellationToken).ConfigureAwait(false); + return false; } return true;