magento-2-smtp icon indicating copy to clipboard operation
magento-2-smtp copied to clipboard

AWS SES error Transaction failed: Missing '"'

Open ilnytskyi opened this issue 4 years ago • 0 comments

Preconditions (*)

Steps to reproduce (*)

  1. Configure AWS SES
  2. Pace an order with customer name like "Test
  3. Use async sending
  4. AWS throws errors like this
Transaction failed: Missing '"'
  1. Magento cannot update the column email_sent in sales_order table

Expected result (*)

  1. Email is sent correctly

Actual result (*)

  1. Magento continuously trying to send the same email with no success because could not update the email_sent column
  2. AWS SES says Transaction failed: Missing '"' Selection_723

PS: example headers are

Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"
Date: Wed, 02 Sep 2020 06:33:17 +0000
From: =?utf-8?Q?teststore.pl?= <[email protected]>
MIME-Version: 1.0
Message-ID: [email protected]
Received: from localhost by mailhog.example (MailHog)
          id [email protected]; Wed, 02 Sep 2020 06:33:17 +0000
Return-Path: <[email protected]>
Subject: =?utf-8?Q?=E2=9C=85=20Potwierdzenie=20z=C5=82o=C5=BCenia=20?= =?utf-8?Q?zam=C3=B3wienia=20w=20sklepie=20teststore.pl?=
To: =?utf-8?Q?"Test=20Test?= <[email protected]>

Our admins advised to check email headers here https://tools.ietf.org/tools/msglint/ Selection_724 That leads to this result

ERROR: unbalanced quote in header 'To' at line 0
ERROR: at least one address required at or before token '=?utf-8?Q?' in 
       header 'To' at line 0

Some characters are not escaped properly during an email sending. The problem may not exist on SMTP servers that do not follow standards as AWS SES does

ilnytskyi avatar Sep 02 '20 07:09 ilnytskyi