mail(): SMTP server response: 550 The address is not valid error on hmailserver(mail(): SMTP server response: 550 The address is not valid error on hmailserver)
问题描述
尽管将 php.ini 配置为有效的 send_from 地址,我仍然收到此错误.我知道它是有效的,因为当我从 squirrel 邮件发送它时它可以工作,但是当用 php 发送邮件时它就不起作用了.无效地址大概是指 send_from 地址.所以我看不出它怎么会认为这是错误的.这是php代码:
I am getting this error despite configuring php.ini to a valid send_from address. I know it is valid because it works when I send it from squirrel mail but when sending mail in php it will just not work. the invalid address presumably refers to the send_from address. so I can't see how it can think it's wrong. here is the php code:
$email="tobiasvogel1@googlemail.com";
$subject = "Your New Password";
$from="admin@dayshare.local";
$message = "Your new password is as follows:
xxxxxxxxxxxxxxxxxxxxxxxxxxx
This email was automatically generated.";
if(!mail($email, $subject,$message,$from)){
echo ("error");
}else echo "success";
在 php.ini 中:
and in php.ini:
SMTP = localhost
sendmail_from = admin@dayshare.local
推荐答案
550 不允许送货到此地址
此错误表示发件人正在尝试将电子邮件发送到不允许他发送到的地址.生成此消息在 hMailServer 检查 IP 范围设置后.举个例子,默认 IP 范围配置不允许外部用户向其他外部用户发送消息.这是为了防止人们使用您的服务器发送垃圾邮件.因此,如果外部用户尝试发送消息给另一个外部用户,他会收到这条消息.
This error means that the sender is trying to send an email to an address which he is not allowed to send to. This message is generated after hMailServer has checked the IP range settings. As an example, the default IP range configuration does not allow external users to send messages to other external users. This is to prevent people from using your server to send spam. So if an external user tries to send a message to another external user, he will get this message.
这就是您遇到的错误的含义.这来自 hMailServer 文档.
That is the meaning of the error you are getting. This is from the hMailServer Documentation.
你可以试试下面的方法是否可行?
Can you try if the following will work?
<?php
mail('tobiasvogel1@googlemail.com','Test Email','This is a test email.',"From: tobiasvogel1@googlemail.com");
?>
如果它不起作用,则可能是由于您的 hMailServer 配置错误,您需要检查您的 hMailServer 日志.
If it doesn't work, then it's probably due to a misconfiguration in your hMailServer and you would need to check your hMailServer Logs.
这篇关于mail(): SMTP server response: 550 The address is not valid error on hmailserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:mail(): SMTP server response: 550 The address is not valid error on hmailserver
基础教程推荐
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01