0

我正在尝试制作一个正则表达式来匹配一个不存在的地址的 gmail 反弹,以便将它与 PHPMailer-BHM 一起使用。

这是消息

<majsha77665251001@gmail.com>: host
gmail-smtp-in-v4v6.l.google.com[173.194.70.26] said: 550-5.1.1 The email
account that you tried to reach does not exist. Please try 550-5.1.1
double-checking the recipient's email address for typos or 550-5.1.1
unnecessary spaces. Learn more at 550 5.1.1
http://support.google.com/mail/bin/answer.py?answer=6596 n7si4762785wiy.46
(in reply to RCPT TO command)

我希望规则匹配电子邮件和消息“您尝试访问的电子邮件帐户不存在”,或者至少“您尝试访问的帐户不存在”。

4

1 回答 1

0

我自己找到的,php代码:

preg_match ("/<(\S+@\S+\w)>.*\n?.*\n?.*account that you tried to reach does not exist/i",$body,$match)
于 2012-07-11T15:30:28.533 回答