【发布时间】:2011-06-10 09:05:45
【问题描述】:
如果我通过 GMail 向这个地址nkhkhlkhlkjlkjkljlkjlk@gmail.com发送电子邮件
我收到如下错误:
向以下收件人投递永久失败
我的问题是,如果我使用 PHP mail 函数发送,我怎样才能收到退回邮件?
我的代码:
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
$to = "nkhkhlkhlkjlkjkljlkjlk@gmail.com";
$subject = "Testing";
$message = "Testing body";
mail($to, $subject, $message, $headers);
【问题讨论】:
标签: php email email-validation