我在网上发现了一些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
<wyunnluqxas12@aol.com>: host mailin-04.mx.aol.com[64.12.88.131] said: 550
5.1.1 <wyunnluqxas12@aol.com>: 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电子邮件),而不是为其他人工作?
答案 0 :(得分:2)
脚本很好&amp;清楚地发送了消息。邮件只是被弹回,这不是脚本的一个因素,而是邮件传输过程失败。也就是说,这似乎是:
答案 1 :(得分:0)
您的电子邮件已被退回。您的邮件系统正常运行,但由于X原因,您的“收件人”目的地不接受您的电子邮件。