1

当我发送带有字符串附件的消息时,打开的字符串附件仅给出 1 并且在电子邮件中显示

--b1_5a1a74831dfa0ce86353d222b95078c6
Content-Type: text/html; name="apperley-invoice-20017.html"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="apperley-invoice-20017.html"

MQ==


--b1_5a1a74831dfa0ce86353d222b95078c6--

我使用此代码添加附件:

$mail->AddStringAttachment($invoicehtml,$filename,'base64','text/html');
4

3 回答 3

0

我不确定您的问题的根源,但我认为您应该改用 SwiftMailer

于 2010-01-24T21:34:25.563 回答
0

在这里查看:

PHPMailer、AddStringAttachment 和数据 URI 方案

基于你得到一个base64结果的事实,我想你要么需要将编码方法更改为quoted-printable或8位,要么首先解码$invoicehtml。

于 2010-01-24T23:15:36.700 回答
0

我敢打赌 $invoicehtml 包含 1. 检查您的输入。

于 2010-07-02T14:13:32.023 回答