我在網上發現了一些php代碼,並對它進行了一些修改,以便它對我有用。這樣做的目標是通過我的域名中的電子郵件向我的收件人發送一封電子郵件,其中包含我想要的信息。它爲我工作的一些電子郵件,但是當我發送郵件到電子郵件的名單上有,我得到一個錯誤,回到我的收件箱下面的文本發送郵件時發生錯誤PHP
Title - "Undelivered Mail Returned to Sender"
Message - "
This is the mail system at host gateway06.websitewelcome.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[email protected]>: host mailin-04.mx.aol.com[64.12.88.131] said: 550
5.1.1 <[email protected]>: Recipient address rejected: aol.com (in
reply to RCPT TO command)"
,我使用才能發送驗證碼收件人的電子郵件如下所示:
<?php
include("Mail.php");
$recipients = $_GET['email'];
$headers["From"] = "";
$headers["To"] = $recipients;
$headers["Subject"] = "";
$body = '';
$params["host"] = "";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "";
$params["password"] = "";
// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);
$mail_object->send($recipients, $headers, $body);
?>
我在做什麼錯?爲什麼它爲一些收件人(我使用@ gmail.com電子郵件嘗試了兩個人),而不是爲其他人工作?
沒有什麼似乎不對的;你有一些不再存在或從未做過的電子郵件,所以系統會拒絕它們,幸運的是它會通知你。 –
'550 5.1.1'表示電子郵件地址無效。它不存在。 –