Php 不允许SMTP错误550发件人
我试图通过php编码来拍摄邮件。但其显示错误“SMTP错误,不允许550发件人”,这是服务器问题还是编码有问题 但是当我直接通过我的cpanel发送邮件时,它会被发送出去 我用来发送邮件的代码是:Php 不允许SMTP错误550发件人,php,email,Php,Email,我试图通过php编码来拍摄邮件。但其显示错误“SMTP错误,不允许550发件人”,这是服务器问题还是编码有问题 但是当我直接通过我的cpanel发送邮件时,它会被发送出去 我用来发送邮件的代码是: <?php $to = "example@gmail.com"; $subject = "HTML email"; $message = " <html> <head> <title>HTML email</title> </head>
<?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);
?>
通常这意味着接收服务器拒绝邮件,因为发件人域和发送SMTP服务器的域不匹配(例如,in不是您的服务器所说的域的一部分)。谢谢大家的帮助。
事实上,这是我服务器端的问题。我的邮件已被我的服务器阻止。
您的邮件服务器可能将自己标识为
foo.example.com
,而收件人的服务器将“我非常怀疑foo.example.com是否允许发送带有example.in地址的邮件”。如果不了解更多有关服务器配置的信息,可能无法回答此问题。