我有一个应用程序运行在EC2实例上。 在部分应用程序中,需要通过电子邮件向用户发送通知。我使用PHP的本地mail()函数。邮件收到后期EC2 PHP
问题是,它似乎不是很稳定。我昨天做了一些测试,发现有些电子邮件是立即收到的,但有些似乎等了很长时间。
我在一分钟内触发了两个通知,几秒钟后我收到第二个事件的通知,但第一个事件通知出现在我的收件箱中需要半小时。
下面是该回来晚的一个电子邮件标题:
Delivered-To: [email protected]
Received: by 10.140.107.75 with SMTP id g69csp40419qgf; Wed, 3 Dec 2014 16:12:00 -0800 (PST)
X-Received: by 10.194.108.162 with SMTP id hl2mr11475479wjb.102.1417651919645; Wed, 03 Dec 2014 16:11:59 -0800 (PST)
Return-Path: <[email protected]>
Received: from ip-xxx-xxx-xxx-xxx.localdomain (ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com. [xx.xx.xx.xx])
by mx.google.com with ESMTP id g6si19323730wjy.43.2014.12.03.16.11.59
for <[email protected]>; Wed, 03 Dec 2014 16:11:59 -0800 (PST)
Received-SPF: none (google.com: [email protected] does not designate permitted sender hosts) client-ip=xx.xx.xx.xx;
Authentication-Results: mx.google.com; spf=none (google.com: [email protected] does not designate permitted sender hosts) [email protected]; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
Received: by ip-172-31-19-221.localdomain (Postfix, from userid 48 id CABF521F29; Wed, 3 Dec 2014 23:38:35 +0000 (UTC)
To: ---- <[email protected]>
Subject: Test
X-PHP-Originating-Script: 500:Notifier.class.php
From: ---- <[email protected]>
Message-Id: <[email protected]>
Date: Wed, 3 Dec 2014 23:38:35 +0000 (UTC)
我无法弄清楚是什么原因造成这一点,所以如果任何人有一个想法,其中的问题可能是,答案是非常感谢!
你意识到,PHP绝对没有什么与实际交付? php的工作就是把你的信件放在街角,并把它扔进邮箱。如果邮政服务很慢,那不是php的问题。 – 2014-12-04 17:19:08