一个简单的通知是这样的,这是我邮箱中的邮件之一,它与其他普通电子邮件混合,但由于它似乎是由服务器生成的,所以我看不到它的任何标准。是否有任何迹象表明邮件是弹跳的(在雅虎,gmail,hotmail),以便我可以使用PHP过滤掉所有这些?
This is an automatically generated Delivery Status Notification
THIS IS A WARNING MESSAGE ONLY.
YOU DO NOT NEED TO RESEND YOUR MESSAGE.
Delivery to the following recipient has been delayed:
saad@asd.com
Message will be retried for 2 more day(s)
Technical details of temporary failure:
The recipient server did not accept our requests to connect. Learn more at http://support.google.com/mail/bin/answer.py?answer=7720
[asd.com (1): Connection timed out]
----- Original message -----
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=message-id:date:subject:from:to:mime-version:content-type;
bh=xAGZvwfEEefGGRgBmLS9pzSumiQ/oasFH6Lc3Z0fNT8=;
b=iB4u5m7ShMuwoZjkK17J+ffZJ1j5Fm5UZTIKCDUcCOt/Diy+a303Or+9x4OCBr0HQW
dlnQ2A462bU1wjN84bIXWU0J+Nz4lNsc1F0DioJBVnlGC2BB0P8eGKXFRyKRU8E+yaAl
nyjwYG05RqXzwtL0g8l0UPeQT7TvrjSOgX8xFiPYOLuCY0UKEBU9M3OsqcyErtB8Sadt
yY7gdUhN6m4gkH83UV7Gxdk/ub9UE+v9PxzukwXKhd1V5pHLB8ErI5NC2QygX+X7AE/Q
VghpEWJwEl6/5HVSJp0pCECbDqkuBSQ+/P2J7Up+9aPAAf1y5PQLWlS6incEJr97MgG6
DTdw==
Received: by 10.68.238.3 with SMTP id vg3mr53910310pbc.140.1332778023318;
Mon, 26 Mar 2012 09:07:03 -0700 (PDT)
Return-Path: <foodilnew@gmail.com>
Received: from [::1] (42-2-253-210.static.netvigator.com. [42.2.253.210])
by mx.google.com with ESMTPS id n7sm8175644pbk.56.2012.03.26.09.07.01
(version=SSLv3 cipher=OTHER);
Mon, 26 Mar 2012 09:07:02 -0700 (PDT)
Message-ID: <1332778007.4f709417422d1@localhost>
Date: Mon, 26 Mar 2012 18:06:42 +0200
Subject: asd
From: asdd <foodilnew@gmail.com>
To: saad@asd.com
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="_=_swift_v4_13327780024f70941258e4f_=_"
sadsda
更新
$message = Swift_Message::newInstance()
->setSubject($row['Subject'])
->setReturnPath('fypboune@gmail.com')
->setFrom(array($row['ReplyTo'] => $row['FromName']))
->setBody($html, 'text/html')
->addPart($txt, 'text/plain');
;
错误传递邮件将转到我的发件人帐户,无论我有特定的返回路径,如何解决?谢谢
答案 0 :(得分:1)
大多数操作都是为发送的邮件设置 ReturnPath 地址,任何到达该地址的邮件都是由服务器而不是人员返回的,因此请扫描服务器添加的错误消息
$pattern_subject = "#delivery errors|delivery failure|delivery has failed|delivery notification|delivery problem|delivery status notif|failure delivery|failure notice|mail delivery failed|mail delivery system|mail status report|mail system error|mail transaction failed|mailserver notification|mdaemon notification|nondeliverable mail|returned email|returned mail|returned mail|returned to sender|returning message to sender|spam eater|undeliverable|undelivered mail|warning: message#i";
$pattern_body = "#554 delivery error|554 TRANSACTION FAILED|Action: failed|Delivery attempts will continue to be made for|delivery temporarily suspended|Invalid recipient|is not a valid mailbox|Mail rejected by Windows Live Hotmail for policy reasons|mailbox is full|Mailbox quota usage exceeded|mailbox unavailable|my badmailfrom list|no mailbox here by that name|no such address|No such user here|not yet been delivered|Over quota|PERM_FAILURE: DNS Error: Domain name not found|Recipient address rejected|retry timeout exceeded|Status: 4.4.1|The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.|The following address doesn't exist|The message that you sent was undeliverable to the following|The recipient name is not recognized|This Gmail user does not exist|This is a permanent error|Unrouteable address|unrouteable mail domain|User mailbox exceeds allowed size|User unknown in virtual alias table|User unknown#i";