- Issue created by @wakaiakari
- Merge request !40Issue #3467675: "$emailAddress" must be a valid email address. → (Open) created by Unnamed author
- 🇮🇹Italy apaderno Brescia, 🇮🇹
SendGridMail::SENDGRID_INTEGRATION_EMAIL_REGEX
is used to split an email address into its name and address components. An email address should not contain any newline character. - 🇯🇵Japan wakaiakari
The name part of the email address is encoded by Symfony\Component\Mime\Encoder\QpEncoder->encodeString().
When the name is `这是一个测试网站`, the string tested against `SendGridMail::SENDGRID_INTEGRATION_EMAIL_REGEX` is not
`这是一个测试网站 ` but rather `=?utf-8?Q?=E8=BF=99=E6=98=AF=E4=B8=80=E4=B8=AA?=\r\n =?utf-8?Q?=E6=B5=8B=E8=AF=95=E7=BD=91=E7=AB=99?= `.Because the name part contains `\r\n`, the email address cannot be split into name and address using SENDGRID_INTEGRATION_EMAIL_REGEX.
As a result, unexpected characters are included in the address, causing it to fail to match FILTER_VALIDATE_EMAIL and resulting in an error.