用php发送电子邮件时出现SMTP server response: 553 authentication is required错误 htmlMimeMail5 你这个类没有用username,password登陆,要是自己连接服务器发信的话,不应该调用mail函数的。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个错误是说你的SMTP不是匿名的,需要用户验证 这个htmlMimeMail5类的发送底层应该还是调用mail函数的。我上面的代码只是把自己真实的用户名和密码隐藏了,在我的程序里用的是真实的用户名和密码啊。setSMTPParams('smtp.163.com',25,'mail.smtp.auth',true,'username','password');当中的参数描述如下:第一个是smtpHost,第二个是port,第三个是HELO command,第四个是验证,的五个是用户名,第六个是密码。 这个表示需要验证至于具体情况 估计是你代码调用的问题那个类没有用过 你可以用PEAR 的smtp参考下面的代码,我发送成功的,如果你的不行就是有可能 服务器的问题 require_once "Mail.php"; class Mail{ static $mail_config=array( "host"=>"mail.xxx.com", "port"=>25, "auth"=>true, "username"=>"[email protected]", "password"=>"xxx", "from"=>"[email protected]", ); private $sender; /** * an sender's result */ private $result; function __construct(){ $this->sender=Mail::factory("smtp", self::$mail_config ); } function process($to,$subject,$body,$user,$pass){ $header=array( "Subject"=>$subject, "From"=>self::$mail_config["from"], ); $this->result=@$this->sender->send($to,$header,$body); return $this->result; } } 检测某列中是否存在某值,更好的办法吗? php中大家通常都用什么方法屏蔽错误信息? 请问php与jsp接口,php读取数据库表并将记录集返回给jsp 分页中删除数据跳回去后数据竟然还在,非要刷新一下才行 我把wordpress放到一个免费的空间里面出现个问题 关于简单函数调用问题! PHP的缓冲区默认是关闭的吗 求教大神一个问题 急!!!!!页面数据不能更新,请教解决方法 360浏览器兼容模式显示正常,极速模式显示空白请问是怎么回事? 关于PHP+AJAX查询提示“正在查找...”的问题 表格提交的数据如何能简单替换某些字符?
setSMTPParams('smtp.163.com',25,'mail.smtp.auth',true,'username','password');当中的参数描述如下:第一个是smtpHost,第二个是port,第三个是HELO command,第四个是验证,的五个是用户名,第六个是密码。
参考下面的代码,我发送成功的,如果你的不行就是有可能 服务器的问题 require_once "Mail.php";
class Mail{
static $mail_config=array(
"host"=>"mail.xxx.com",
"port"=>25,
"auth"=>true,
"username"=>"[email protected]",
"password"=>"xxx",
"from"=>"[email protected]",
);
private $sender;
/**
* an sender's result
*/
private $result;
function __construct(){
$this->sender=Mail::factory("smtp",
self::$mail_config
);
}
function process($to,$subject,$body,$user,$pass){
$header=array(
"Subject"=>$subject,
"From"=>self::$mail_config["from"],
);
$this->result=@$this->sender->send($to,$header,$body);
return $this->result;
}
}