【问题标题】:SMTP error 550 Sender is not allowedSMTP 错误 550 不允许发件人
【发布时间】:2018-02-26 20:21:07
【问题描述】:

我试图通过 php 编码来发送邮件。但它显示错误“SMTP 错误,550 Sender is not allowed”,是服务器问题还是编码有问题?

但是当我直接通过我的 cpanel 发送邮件时,它会被送达。

我用来发送邮件的代码是:

<?php
$to = "example@gmail.com";
$subject = "HTML email";
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: support@example.in' . "\r\n";
$headers .= 'Cc: uraijada@example.in' . "\r\n";
mail($to,$subject,$message,$headers);
?>

【问题讨论】:

  • 您的邮件服务器可能将自己标识为foo.example.com,而收件人的服务器正在“我非常怀疑是否允许 foo.example.com 使用 example.in 地址发送邮件”。跨度>
  • 如果不了解更多有关服务器配置的信息,可能无法回答此问题。

标签: php email


【解决方案1】:

通常这意味着接收服务器拒绝邮件,因为 FROM 域和发送 SMTP 服务器的域不匹配(例如 example.in 与您的服务器所说的域不同) )。

【讨论】:

    【解决方案2】:

    非常感谢你们的帮助。
    实际上它发现是我的服务器端的问题。我的邮件被我的服务器阻止了。

    【讨论】:

      猜你喜欢
      • 2017-05-14
      • 1970-01-01
      • 1970-01-01
      • 2017-08-26
      • 2012-08-12
      • 1970-01-01
      • 2015-02-20
      • 2021-12-13
      • 2013-03-06
      相关资源
      最近更新 更多