我正在尝试实现这个脚本: 发送带有附件的 PHP HTML 邮件
我在脚本中唯一修改的是发送地址和文件。我正在尝试附加.mp3
文件而不是.zip
文件 - 也许这就是我得到意外结果的原因?
.mp3
文件只有31kb
但是当我收到电子邮件时,邮件中没有附件,也没有 HTML 格式。
电子邮件包含:
--PHP-mixed-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: multipart/alternative; boundary="PHP-alt-a80d597fc7c02e67ff5be867c7a48bab"
--PHP-alt-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello World!!!
This is simple text email message.
--PHP-alt-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
<h2>Hello World!</h2>
<p>This is something with <b>HTML</b> formatting.</p>
--PHP-alt-a80d597fc7c02e67ff5be867c7a48bab--
--PHP-mixed-a80d597fc7c02e67ff5be867c7a48bab
Content-Type: application/zip; name="attachment.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
SUQzAwAAAAABIVRQRTEAAAAfAAAB//5DAGgAZQBlAHMAZQBDA.....