使用PhpMailer将文本/html内容正文发送到yandex

使用PhpMailer将文本/html内容正文发送到yandex,php,smtp,phpmailer,Php,Smtp,Phpmailer,我正在使用以下脚本并尝试发送html文本。除了yandex之外,该脚本与gmail、hotmail等功能完美配合 当我向yandex帐户发送电子邮件时,图像(徽标)不会显示,因为yandex以纯文本的形式展示身体 $mail = new PHPMailer; $mail->setFrom('garaux@garaux.com', 'First Last'); $mail->addReplyTo('garaux@garaux.com', 'First Last'); $mai

我正在使用以下脚本并尝试发送html文本。除了yandex之外,该脚本与gmail、hotmail等功能完美配合

当我向yandex帐户发送电子邮件时,图像(徽标)不会显示,因为yandex以纯文本的形式展示身体

 $mail = new PHPMailer;

 $mail->setFrom('garaux@garaux.com', 'First Last');
 $mail->addReplyTo('garaux@garaux.com', 'First Last');
 $mail->addAddress('danielgaraux@yandex.com', 'John Doe');
 $mail->Subject = 'PHPMailer mail() test';
 $mail->msgHTML(file_get_contents('content.html'), dirname(__FILE__));
 $mail->AltBody = 'Request';

 if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
YANDEX消息:

Received: from mxfront1h.mail.yandex.net ([127.0.0.1])
by mxfront1h.mail.yandex.net with LMTP id s8gKzNkA
for <danielgaraux@yandex.com>; Fri, 11 Dec 2015 20:34:05 +0300
Received: from emerson.ch-meta.net (emerson.ch-meta.net [80.74.145.140])
by mxfront1h.mail.yandex.net (nwsmtp/Yandex) with ESMTPS id QYzzKlQjLM-    Y4D4vaWO;
Fri, 11 Dec 2015 20:34:04 +0300
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(Client certificate not present)
Return-Path: info@armani.com
X-Yandex-Front: mxfront1h.mail.yandex.net
X-Yandex-TimeMark: 1449855244
X-Yandex-Spam: 1
Received: by emerson.ch-meta.net (Postfix, from userid 10072)
id C9E595EA26EB; Fri, 11 Dec 2015 18:34:03 +0100 (CET)
To: John Doe <danielgaraux@yandex.com>
Subject: Aggiornamenti
X-PHP-Originating-Script: 10072:class.phpmailer.php
Date: Fri, 11 Dec 2015 18:34:03 +0100
From: First Last <info@armani.com>
Reply-To: First Last <replyto@armani.com>
Message-ID: <a5595b0b0404f7a50c971d624dd381bc@online-shop.cuccioletto.com>
X-Mailer: PHPMailer 5.2.14 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_a5595b0b0404f7a50c971d624dd381bc"
Content-Transfer-Encoding: 8bit
X-Yandex-Forward: 577bb78e4bda6bc495c0ae8a29ce9d99

This is a multi-part message in MIME format.

--b1_a5595b0b0404f7a50c971d624dd381bc
Content-Type: text/plain; charset=us-ascii

This is a plain-text message body
已收到:来自mxfront1h.mail.yandex.net([127.0.0.1])
通过mxfront1h.mail.yandex.net使用LMTP id s8gKzNkA
对于2015年12月11日星期五20:34:05+0300
收到:来自emerson.ch-meta.net(emerson.ch-meta.net[80.74.145.140])
通过mxfront1h.mail.yandex.net(nwmtp/yandex),使用ESMTPS id QYZKLQJLM-Y4D4vaWO;
2015年12月11日星期五20:34:04+0300
(使用TLSv1.2和密码ECDHE-RSA-AES128-GCM-SHA256(128/128位))
(客户端证书不存在)
返回路径:info@armani.com
X-Yandex-Front:mxfront1h.mail.Yandex.net
X-Yandex-TimeMark:1449855244
X-Yandex-Spam:1
接收:由emerson.ch-meta.net(后缀,来自用户ID 10072)
id C9E595EA26EB;2015年12月11日星期五18:34:03+0100(CET)
致:约翰·多伊
主题:Aggiornamenti
X-PHP-origing-Script:10072:class.phpmailer.PHP
日期:2015年12月11日星期五18:34:03+0100
发信人:第一个最后一个
答复:首末
消息ID:
X-Mailer:PHPMailer 5.2.14(https://github.com/PHPMailer/PHPMailer)
MIME版本:1.0
内容类型:多部分/备选;
boundary=“b1_A5595B0404F7A50C971D624DD381BC”
内容传输编码:8比特
X-Yandex-Forward:577bb78e4bda6bc495c0ae8a29ce9d99
这是MIME格式的多部分消息。
--b1_A5595B0404F7A50C971D624DD381BC
内容类型:文本/纯文本;字符集=美国ascii码
这是一个纯文本消息正文

请显示yandex上收到的消息的来源。很可能他们正在对破坏HTML的消息应用过滤。嗨,我在上面的主消息中写了标题信息,这不是一条完整的消息-缺少另一个边界。如果PHPMailer认为它只是一个单部分消息,它将不会使用多部分MIME类型。请显示在yandex上收到的消息的来源。很可能他们正在对破坏HTML的消息应用过滤。嗨,我在上面的主消息中写了标题信息,这不是一条完整的消息-缺少另一个边界。如果PHPMailer认为它只是一条由单个部分组成的消息,那么它就不会使用多部分MIME类型。