在 Outlook 中随机 HTML 电子邮件字符替换为“=”
Random HTML Email characters replaced with "=" in Outlook
我已删除这封电子邮件,但它仍然显示问题:某些随机字符在 Outlook 中被替换为“=”。我使用 PHP/Codeigniter 和 sparkpost.com 作为邮件机制。
在outlook.com中:
在gmail/other个客户测试中,没问题
电子邮件配置:
$config['protocol'] = 'smtp';
$config['smtp_host'] = "smtp.sparkpostmail.com";
$config['smtp_user'] = "SMTP_Injection";
$config['smtp_pass'] = " ";
$config['smtp_port'] = 587;
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
已精简 HTML 用于电子邮件
有什么想法吗?
在您的配置中添加以下行:
$config['crlf'] = "\r\n";
原因如下:
根据 RFC 2045,对于可引用的可打印编码,必须使用 \r\n
。
然而 Codeigniter 打破了这个规则,因为他们说一些服务器不能正确处理这个,因此只使用 \n
。
这记录在 /system/libraries/EMail.php 下的电子邮件库中。
你可以在官方 Github Rep.
上看到 in Line 182
我已删除这封电子邮件,但它仍然显示问题:某些随机字符在 Outlook 中被替换为“=”。我使用 PHP/Codeigniter 和 sparkpost.com 作为邮件机制。
在outlook.com中:
在gmail/other个客户测试中,没问题
电子邮件配置:
$config['protocol'] = 'smtp';
$config['smtp_host'] = "smtp.sparkpostmail.com";
$config['smtp_user'] = "SMTP_Injection";
$config['smtp_pass'] = " ";
$config['smtp_port'] = 587;
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
已精简 HTML 用于电子邮件
有什么想法吗?
在您的配置中添加以下行:
$config['crlf'] = "\r\n";
原因如下:
根据 RFC 2045,对于可引用的可打印编码,必须使用 \r\n
。
然而 Codeigniter 打破了这个规则,因为他们说一些服务器不能正确处理这个,因此只使用 \n
。
这记录在 /system/libraries/EMail.php 下的电子邮件库中。 你可以在官方 Github Rep.
上看到 in Line 182