服务器响应550,php – mail():SMTP服务器响应:550 hmailserver上的地址无效错误

尽管将php.ini配置为有效的send_from地址,但我收到此错误.我知道它是有效的,因为当我从松鼠邮件发送它时它起作用但是当用php发送邮件时它将无效.无效地址可能是指send_from地址.所以我看不出它怎么会认为这是错的.这是PHP代码:

$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中:

SMTP = localhost

sendmail_from = admin@dayshare.local

解决方法:

550 Delivery is not allowed to this address

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.

你可以尝试以下方法吗?

mail('tobiasvogel1@googlemail.com','Test Email','This is a test email.',"From: tobiasvogel1@googlemail.com");

?>

如果它不起作用,那么可能是由于你的hMailServer配置错误而你需要检查你的hMailServer Logs.

标签:php,smtp,hmail-server

来源: https://codeday.me/bug/20190923/1814525.html

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值