显示错误-使用PHP发送HTML电子邮件
我写了下面的代码,执行时出错显示错误-使用PHP发送HTML电子邮件,php,email,Php,Email,我写了下面的代码,执行时出错 <?php $to = "somebody@example.com"; $subject = "My subject"; $txt = "Hello world!"; $headers = "From: webmaster@example.com" . "\r\n" . "CC: somebodyelse@example.com"; $retval = mail($to,$subj
<?php
$to = "somebody@example.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";
$retval = mail($to,$subject,$txt,$headers);
if( $retval == true ) {
echo "Message sent successfully...";
}else {
echo "Message could not be sent...";
}
?>
网址:
无法发送消息。。。PHP警告:
邮件(E:\IIS\LogFiles\PHP\php53mail.log):无法打开流:
F:\domains\casaplaya.co.za\wwwroot\test-email.php中的权限被拒绝
第18行PHP警告:mail():SMTP服务器响应:550没有这样的用户
在第18行的F:\domains\casaplaya.co.za\wwwroot\test-email.php中
我想不出这个问题的原因。如果有人能帮我找到解决办法,那就太好了
提前感谢。您是否将正确的用户添加到标题?可能是重复的