1

我正在尝试在 joomla 网站中设置联系表单模块。联系人模块适用于我的每个个人电子邮件地址,例如 xxxxxxxxxxxx@gmail.com 或 xxxxxxxxxxxx@libero.it 等。但是当我用我客户的公司邮件收件人测试它时,邮件功能无法完成它的工作。

为了获得有关失败的更多信息,我将 mailsender 属性设置为我的个人邮件地址,如下所示:

$mailSender->setSender('xxxxxxx@libero.it');
$mailSender->addReplyTo('xxxxxxx@libero.it');

这就是我得到的:

原始消息是在 2012 年 10 月 21 日星期日 15:05:00 +0200 从 apache@localhost 收到的

----- 以下地址有永久性致命错误 -----

info@xxxxxx.it
(reason: 553 5.3.0 <info@xxxxxx.it>... No such user here)
(expanded from: info@xxxxxx.it)

----- 会议记录如下 -----

... while talking to [127.0.0.1]:
>>> DATA
<<< 553 5.3.0 <info@xxxxxx.it>... No such user here
550 5.1.1 info@xxxxxx.it... User unknown
<<< 503 5.0.0 Need RCPT (recipient)

在附件中:

Reporting-MTA: dns; xxxxxx.yyyyyyy.com
Arrival-Date: Sun, 21 Oct 2012 15:05:00 +0200

Final-Recipient: RFC822; info@xxxxxx.it
Action: failed
Status: 5.3.0
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 553 5.3.0 <info@xxxxxx.it>... No such user here
Last-Attempt-Date: Sun, 21 Oct 2012 15:05:01 +0200

公司的 webmail 似乎不接受来自自己服务器的邮件。我不是电子邮件专家,也不是专家 php 程序员。有任何想法吗?

遵循我的 joomla 模块的部分,其中邮件功能被启动并启动:

 $mailSender = &JFactory::getMailer();
$mailSender->addRecipient($recipient);

$mailSender->setSender('xxxxxxxxxxxxx@libero.it');
$mailSender->addReplyTo('xxxxxxxxxxxxx@libero.it');

$mailSender->setSubject('Richiesta informazioni da sito web');
$mailSender->setBody($myMessage);

if ($mailSender->Send() !== true) {
  $myReplacement = '<span style="color: ' . $error_text_color . ';">' . $errorText . '</span>';
  //header("Location: $url",303);
  print $myReplacement;
  return true;
}
else {
  $myReplacement = '<span style="color: '.$thanksTextColor.';">' . $pageText . '</span>';
  print $myReplacement;
  return true;
}
4

3 回答 3

2

您正在通过 localhost 中继邮件(您正在与 交谈127.0.0.1),因此您的本地 sendmail 安装可能认为它应该为您的域处理邮件,而不仅仅是中继。系统上没有调用用户,info因此它返回错误550 No such user here

检查/etc/mail/local-host-names并查看域是否在此处列出,是否将其注释掉并使用 .restart 重新启动 sendmail service sendmail restart

还要验证您是否允许中继本地主机/etc/mail/access,我的文件在 CentOS 5.8 和 Sendmail 8.13.8 上看起来像这样

Connect:localhost.localdomain           RELAY
Connect:localhost                       RELAY
Connect:127.0.0.1                       RELAY

另一种选择是使用真正的邮件服务器作为 SMTP 中继而不是 sendmail on localhost- 我不能说它对于有问题的域是什么,但可能是smtp.example.commail.example.com. 另一个需要注意的是,此服务器可能需要身份验证才能从您的 Web 服务器中继邮件 - 您需要与您的管理员核实并相应地更新您的 PHP 代码。

于 2012-10-21T14:21:39.070 回答
0

让我看看我是否明白你告诉我的:1)托管我的 joomla 网站的服务器有一个管理邮件发送请求的邮件“引擎”;2) 鉴于收件人 info@xxxxxx.it 位于收集它调用 127.0.0.1 的请求的同一邮件服务器上;

3)找不到名为info的用户;

事实上,我对客户的公司网络邮件和网络服务器没有任何控制权。

我可以屏蔽请求以不显示它来自本地主机吗?还有其他解决方案吗?对不起,我的英语不好....

于 2012-10-21T14:59:21.897 回答
0

这可能是因为发件人的电子邮件不是您尝试发送电子邮件的邮件列表的注册成员。一些邮件列表只接受来自注册为成员的电子邮件地址的电子邮件(可以在允许的发件人中管理,在邮件列表的选项中)。

于 2012-10-21T14:05:12.243 回答