354
SMTPINFOCriticalMail TransactionHIGH confidence

Start mail input; end with <CRLF>.<CRLF>

What this means

The 354 code is an intermediate reply sent after the client issues the `DATA` command. It signals the client to start sending the email's content (headers and body), ending the data with a single period on a new line.

Why it happens
  1. 1The client has successfully issued `EHLO`, `MAIL FROM`, and `RCPT TO` commands.
  2. 2The client sends the `DATA` command to begin transmitting the email message.
How to reproduce

A client has specified the sender and recipient and is now ready to send the email body.

trigger — this will error
trigger — this will error
DATA
354 End data with <CR><LF>.<CR><LF>

expected output

354 Start mail input

Fix

Send headers and body terminated with CRLF.CRLF

WHEN After the server responds to DATA with 354

Send headers and body terminated with CRLF.CRLF
DATA
354 End data with <CR><LF>.<CR><LF>

From: sender@example.com
To: recipient@example.com
Subject: Hello

Message body.
.
250 2.0.0 OK: queued

Why this works

The message body ends with a single period on its own line (CRLF.CRLF). Any body line starting with a period must be dot-stuffed (prefixed with an extra period) to prevent premature termination.

What not to do

Forget to dot-stuff message body lines that start with a period

A line beginning with a period signals end-of-data. Without dot-stuffing the server will truncate the email at the first such line.

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SMTP errors