使用PhpMailer将text / html内容体发送到yandex

时间:2015-12-14 09:18:20

标签: php smtp phpmailer

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

当我向yandex帐户发送电子邮件时,图像(徽标)未显示为beacuse yandex int将正文表示为纯文本。

 $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 MESSAGE:

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

0 个答案:

没有答案