Tim*_*smo 5 encoding ruby-on-rails actionmailer
建立:
Ruby 1.9.2
Rails 3.2.2
Run Code Online (Sandbox Code Playgroud)
我在编写电子邮件时遇到了一些麻烦.
注意:我不熟悉编码和类似的东西.
使用ActionMailer发送电子邮件时,电子邮件中的html会发生奇怪的事情.
所有等号(=)都会变为=3D.例:
<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"=440">
<tbody>
<tr>
<td height=3D"10"> </td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
特殊字符如下所示:ä- > ä.
它在本地开发中看起来很棒,但在生产服务器上使用SendGrid时,特殊字符不起作用.
我确定这是因为我缺乏理解.
这是邮件标题:
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-SMTPAPI: {"filters": {}}
Run Code Online (Sandbox Code Playgroud)
它有什么关系Content-Transfer-Encoding吗?或者它应该是那样的?
也许这是SendGrid的问题,而不是我的设置?
SendGrid的一名员工告诉我:you need to make sure your equals signs are URI-encoded这是什么意思?提前致谢!
这对我来说不是问题,而是 SendGrid。\n通过 SendGrid 发送的包含“\xc3\xa5\xc3\xa4\xc3\xb6”等字符的邮件在 yahoo/outlook/MacMail 等邮件客户端中不起作用。
\n\n经过 SendGrid 员工几个小时的支持后,问题仍然存在。\n他们说问题出在我的设置中。\n我现在已切换到具有完全相同设置的 mailgun,并且效果很好。
\n| 归档时间: |
|
| 查看次数: |
1996 次 |
| 最近记录: |