human-element / module-configurable-email-encoding
使传输构建器的全局 Content-Transfer-Encoding 可配置
1.0.1
2023-02-01 20:24 UTC
Requires
- php: ~8.1
- human-element/module-base: ^2.0
README
解决 Sendgrid 的问题
https://docs.sendgrid.com/for-developers/sending-email/send-mime-messages-with-sendgrid
当使用 Webscale(它使用 SendGrid 提供电子邮件中继服务)时,出现此错误。
SendGrid 不处理 Content-Transfer-Encoding: quoted-printable
,额外的 CRLF 字符会导致源内容损坏。
例如,vendor/magento/module-user/view/adminhtml/email/password_reset_confirmation.html
渲染为
First Last,=0A=0AThere was recently a request to change the passwor=
d for your account.=0A=0AIf you requested this change, reset your passwo=
rd here:=0A=0Ahttps://domain.com/admin/admin/auth/=
resetpassword/?id=3Dtoken
you did not make this request, you can ignore this email and your passwo=
rd will remain the same.=0A=0AThank you,=0AStore Name
这在技术上对 quoted-printable
是有效的,但它会破坏 SendGrid 的正文处理
此模块允许您在 Magento 传输构建器中选择默认电子邮件编码为 7bit
。
默认情况下,此模块将选择 7bit
,但您可以通过为此模块的行政配置切换回 quoted-printable
来测试它。
安装
composer require human-element/module-configurable-email-encoding