Mailer Error: SMTP Error: data not accepted. SMTP server error: DATA END command failed Detail: Timeout waiting for data from client. SMTP code: 451 Additional SMTP info: 4.4.2

0

Some of our clients are encountering the following error when sending emails using SES.

Mailer Error: SMTP Error: data not accepted. SMTP server error: DATA END command failed Detail: Timeout waiting for data from client. SMTP code: 451 Additional SMTP info: 4.4.2

$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->Port = 587;
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Encoding = 'base64';

$mail->Host = 'xxxxxxx.amazonaws.com';
$mail->Username = 'xxxxxxxxxxx';
$mail->Password = 'xxxxxxxxxxxxxx';

$mail->SMTPOptions = [
     'ssl' => ['crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT]
];

// PHP version 5.6

For some clients, this operates without any issues.

How to resolve this?

Thank you.

1 Answer
4

Please check by below steps:

  1. Network or Firewall Issues – Ensure that outbound connections to SES SMTP servers are not being blocked by firewalls or network policies.
  2. Rate Limiting by SES – Amazon SES has sending limits. If emails are sent too quickly, SES may temporarily reject requests. Try reducing the sending rate.
  3. MTU Size Configuration – If your network interface has an MTU size that is too large, it can cause timeouts. Try setting the MTU size to 1500 bytes.
  4. TLS Configuration – Ensure that your TLS settings are correct. Some SES users have resolved similar issues by explicitly setting TLSv1.2.

https://docs.aws.amazon.com/ses/latest/dg/troubleshoot-smtp.html

EXPERT
answered 6 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions