简体   繁体   English

PHPMailer 更改内容传输编码

[英]PHPMailer changing Content-transfer-encoding

I'm developing a program which uses PHPMailer.我正在开发一个使用 PHPMailer 的程序。

I want to change "Content-transfer-encoding" in header of email.我想更改电子邮件标题中的“内容传输编码”。

Here is my eml format email header sample.这是我的 eml 格式电子邮件标题示例。

MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

BUT I want to change "quoted-printable" to "base64"但我想将“quoted-printable”更改为“base64”

MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64

Is there any solution change encoding??是否有任何解决方案更改编码?

You could try reading the documentation , or looking at the source code.您可以尝试阅读文档或查看源代码。 In short, do this:简而言之,这样做:

$mail->Encoding = 'base64';

But I wouldn't advise doing this;但我不建议这样做; base64-encoded HTML bodies make you look like a spammer. base64 编码的 HTML 正文让您看起来像垃圾邮件发送者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM