即时通讯尝试使用postfix和PEAR Mail将电子邮件从我的VPS发送到hotmail帐户,它完全发送给yahoo,gmail,但是hotmail直接进入垃圾邮件,我知道之前已经问过问题,我已经尝试了一切,
我的主机名是libreriaplenitud.mx
这是我的PHP脚本
include('Mail.php');
include('Mail/mime.php');
// Constructing the email
$sender = "Jorge <[email protected]>"; // Your name and email address
$recipient = "El Yorch <[email protected]>"; // The Recipients name and email address
$subject = "Test Email"; // Subject for the email
$text = 'This is a text message.'; // Text version of the email
$html = '<html><body><p>This is a html message</p></body></html>'; // HTML version of the email
$crlf = "\n";
$headers = array(
'From' => $sender,
'Return-Path' => $sender,
'Subject' => $subject
);
// Creating the Mime message
$mime = new Mail_mime($crlf);
// Setting the body of the email
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$body = $mime->get();
$headers = $mime->headers($headers);
// Sending the email
$mail =& Mail::factory('mail');
if($mail->send($recipient, $headers, $body)){
echo 'email sent succesfully';
}
这是hotmail收到的标题
Authentication-Results: hotmail.com; spf=none (sender IP is 192.34.60.167)
[email protected]; dkim=none header.d=libreriaplenitud.mx;
x-hmca=none
X-SID-PRA: [email protected]
X-AUTH-Result: NONE
X-SID-Result: NONE
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtHRD0yO1NDTD02
X-Message-Info:
11chDOWqoTkNi4xaXoUxBJHNxb4q3jMdTE9occzTaBqAAmPh8MI+3AvSCyxtKvnRXgUwZQ9hB9zRIQG0MbHnJc1TejqWYpS9Vk7aOR7/8zlZcfOTkN+DLYQYashlrK5kkvMohRBt73VDj9hh9fgOPZb7AfegtTPz
Received: from libreriaplenitud.mx ([192.34.60.167]) by COL0-MC1-F2.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900);
Sun, 14 Apr 2013 14:51:31 -0700
Received: by libreriaplenitud.mx (Postfix, from userid 33)
id 2498040A95; Sun, 14 Apr 2013 21:51:31 +0000 (UTC)
To: El Yorch <[email protected]>
Subject: Test Email
X-PHP-Originating-Script: 0:mail.php
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_4404fe2999b34dc58f10c890ae3d5e76"
From: Jorge <[email protected]>
Message-Id: <[email protected]>
Date: Sun, 14 Apr 2013 21:51:31 +0000 (UTC)
Return-Path: [email protected]
X-OriginalArrivalTime: 14 Apr 2013 21:51:32.0085 (UTC) FILETIME=[39DB8250:01CE395A]
--=_4404fe2999b34dc58f10c890ae3d5e76
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1
This is a text message.
--=_4404fe2999b34dc58f10c890ae3d5e76
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1
<html><body><p>This is a html message</p></body></html>
--=_4404fe2999b34dc58f10c890ae3d5e76--
我想我没有被列入黑名单,我只是设置了这个vps
什么想法可能是错的?
提前致谢
它不是电子邮件库,而是您的MX域,主要是您缺少某些东西。您必须设置DomainKeys / DKIM和SPF才能使您的电子邮件合法。而且,即使你设置了这些,不要指望进入收件箱,这将是50/50的机会。如今,电子邮件是一场真正的噩梦。
您现在进入收件箱的唯一原因是因为您的IP地址干净且没有垃圾邮件,但不要指望这会持续下去,您迟早会被列入黑名单。
只是一个提示,你可以使用像http://mandrill.com/(他们有一个很好的api)的smth发送电子邮件,它是免费的少量电子邮件,可以让你走得很快,重要的是你每次都会到达收件箱你不必经历一个叫做电子邮件设置的噩梦。