自从我在Inmotion Hosting从共享主机更改为VPS后,我一直有电子邮件问题,并且支持无法帮助我。如果可以,你应该在Inmotion Hosting工作=)。
当我的网站使用PHP vanilla mail()(预订确认等)发送电子邮件时,我的所有电子邮件都被Microsoft服务器标记为垃圾邮件(@ msn.com,@ hotmail.com等)。当我通过我的电子邮件客户端(Thunderbird)或通过网络邮件发送电子邮件时,所有电子邮件都可以正常完成。
这是来自网站的电子邮件标题(被标记为垃圾邮件):
x-store-info:4r51+eLowCe79NzwdU2kR0zqpsRfiBoyI3IQ2Zy1UTkQ55b7tRUtzoU6PrUJSFB0oySrjR39TlGfHeGMjzyBE7vAprX1Qut7AjkZmP73XwQ5UhN/wjbganEDSyell12MNjR75URHDeg=
Authentication-Results: hotmail.com; spf=none (sender IP is 198.46.84.148) smtp.mailfrom=easter40@secure.easterisland.travel; dkim=none header.d=easterisland.travel; x-hmca=none header.id=info@easterisland.travel
X-SID-PRA: info@easterisland.travel
X-AUTH-Result: NONE
X-SID-Result: NONE
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtHRD0yO1NDTD02
X-Message-Info: /3z5fcrqMMUMuqyIyKstMXLVq7u60TmAzd6cXJ5ZZxdbQVUetEJ+OG3sb2YlheUWkmyQ4fwnBSKPmOw9vGQj+ZCNhMG6TFxshX0hhpl8AftbwCNagRX7px3mUn+Oy0WbKK6yXLOOVkYGv+BJUQcSQk/+iN1O0wZ/Y1fSs5VIz2duyY0X1Rf6AheX3UJy0pCVctLHeebzg5If1TQ89UdjLKQeXcjeN8LTT9GPhCCFHv4mJlzRg+G7aQ==
Received: from secure.easterisland.travel ([198.46.84.148]) by COL004-MC6F28.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23143);
Wed, 3 Feb 2016 12:29:36 -0800
Received: from easter40 by secure.easterisland.travel with local (Exim 4.86)
(envelope-from <easter40@secure.easterisland.travel>)
id 1aR43Q-0002xu-GJ; Wed, 03 Feb 2016 15:29:35 -0500
To: m.edensky@live.se
Subject: Booking inquiry sent!
X-PHP-Script: www.easterisland.travel/ajax/sendEmail.php for 186.37.129.249
MIME-Version: 1.0
Content-type: text/html; charset=UTF-8
To: Marcus Edensky <m.edensky@live.se>
From: Easter Island Travel <info@easterisland.travel>
Message-Id: <E1aR43Q-0002xu-GJ@secure.easterisland.travel>
Date: Wed, 03 Feb 2016 15:29:32 -0500
X-OutGoing-Spam-Status: No, score=1.7
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - secure.easterisland.travel
X-AntiAbuse: Original Domain - live.se
X-AntiAbuse: Originator/Caller UID/GID - [504 504] / [47 12]
X-AntiAbuse: Sender Address Domain - secure.easterisland.travel
X-Get-Message-Sender-Via: secure.easterisland.travel: authenticated_id: easter40/from_h
X-Authenticated-Sender: secure.easterisland.travel: info@easterisland.travel
Return-Path: easter40@secure.easterisland.travel
X-OriginalArrivalTime: 03 Feb 2016 20:29:36.0172 (UTC) FILETIME=[992876C0:01D15EC1]
通过Thunderbird发送的电子邮件中的标题:
x-store-info:4r51+eLowCe79NzwdU2kR0zqpsRfiBoyI3IQ2Zy1UTlmiwJyCc7gjkkyPiEHm+iis6y6rzdJPoqrUEDjycuD1moHrvrfMyp8ZOGO72UCPP8gWu+QBmm5PD7Ojol6KtIR1l0GIuB0Aak=
Authentication-Results: hotmail.com; spf=pass (sender IP is 198.46.84.148) smtp.mailfrom=info@easterisland.travel; dkim=pass header.d=easterisland.travel; x-hmca=pass header.id=info@easterisland.travel
X-SID-PRA: info@easterisland.travel
X-AUTH-Result: PASS
X-SID-Result: PASS
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtHRD0yO1NDTD00
X-Message-Info: /3z5fcrqMMUR0dwt6iqUxJED9hyedMN4CRQ38legRDRBfL6MMv//dM1rcWa1asrgpUQP92eCKmFNkktlyn4QaM+/ZZMWICtPEX8l9M6RQzCqbBUW0GXOFb9dLuVmYKhFytGW9gMHHD5os5zV1yijkU6bu61OMl2xtDrFT4Vkj5my3z6LMITU5JZEpjTDoKocrpOCjCXFAH/qzo7RvFZuH9KiRb4DIRgbQwDIJqTYKP/43UjAnPbq9A==
Received: from secure.easterisland.travel ([198.46.84.148]) by COL004-MC3F42.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23143);
Wed, 3 Feb 2016 13:23:15 -0800
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=easterisland.travel; s=default; h=Content-Type:MIME-Version:Date:Message-ID
:Subject:From:To; bh=k23oFIOL0dvMqR63vfQ+HyAXIsIWIhA8s626IBg0K3I=; b=MwT2zvo8
MPTcQCghWzsTHA5KxKfUd5FvwlEQfmLVrteaRJY8/aiMx6dANXMLQZ0Qriq5HzDXBJwktWfXJmCgC
YITekxeMX6uGSJ82CQyQ6s6dE9Cry9JGHsXJ3E1KFyG6LOArEkBCR31BVhoViJvAvdgs/zP6FLLFb
7EOh5QS8hg0UX+GXOAOyTSSfLN0CJAmJBMrmXzfF9ZqI3F+w7U4BNov+0nRpxqE7NRnv0mHWFutBS
FQSG7B6FgcA6K0cdPRaSpOvwxxszLZiYoK/CWY6oVUAzTRKpl57UFE9QBE7SWWL83egbHpmBgYuP1
z6FF3n0Z/RbAYybrQjaQR+XWrw==;
Received: from [186.37.129.249] (port=63085)
by secure.easterisland.travel with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.86)
(envelope-from <info@easterisland.travel>)
id 1aR4tK-00039S-Rr
for m.edensky@live.se; Wed, 03 Feb 2016 16:23:14 -0500
To: m.edensky@live.se
From: Easter Island Travel <info@easterisland.travel>
Subject: test
Message-ID: <56B26FB5.7090305@easterisland.travel>
Date: Wed, 3 Feb 2016 16:23:01 -0500
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101
Thunderbird/38.5.1
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="------------020005080507070709050505"
X-OutGoing-Spam-Status: No, score=0.3
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - secure.easterisland.travel
X-AntiAbuse: Original Domain - live.se
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - easterisland.travel
X-Get-Message-Sender-Via: secure.easterisland.travel: authenticated_id: info@easterisland.travel
X-Authenticated-Sender: secure.easterisland.travel: info@easterisland.travel
Return-Path: info@easterisland.travel
X-OriginalArrivalTime: 03 Feb 2016 21:23:15.0570 (UTC) FILETIME=[18119D20:01D15EC9]
This is a multi-part message in MIME format.
--------------020005080507070709050505
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
正如您所看到的,标记为垃圾邮件的电子邮件使用的是不存在的电子邮件地址(easter40@secure.easterisland.travel),并且spf + dkim记录不存在(inmotionhosting支持告诉我无法将这些记录应用于此主机名。)
您还可以看到,从网站发送的电子邮件(以及由MS标记为垃圾邮件)是使用主机名easter40@secure.easterisland.travel发送的。我希望它们使用info@easterisland.travel作为主机名发送。这应该可以让电子邮件发送,对吗?
这是怎么做到的? php.ini中?有什么想法吗?
谢谢!
修改
这些是我用来通过网站发送所有电子邮件的标题:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$headers .= 'To: ' . $_POST['name'] . ' <' . $_POST['email'] . '>' . "\r\n";
$headers .= "From: Easter Island Travel <info@easterisland.travel>" . "\r\n";