@Cristian:我正在使用的版本:2.0.4。
$this->load->library('PhpMailer');
$this->phpmailer->Host = "mail.xxx.org";
$this->phpmailer->IsSMTP();
$this->phpmailer->SMTPAuth = true;
$this->phpmailer->Username = 'xxx';
$this->phpmailer->Password = 'xxxx';
$this->phpmailer->From= '[email protected]';
$this->phpmailer->FromName = 'xxx Info';
$this->phpmailer->AddReplyTo('[email protected]', 'Info');
$this->phpmailer->Subject = 'Php mailer test';
$this->phpmailer->Body = 'test msg body';
$this->phpmailer->SMTPDebug = 2;
$this->phpmailer->AddAddress('[email protected]', 'BlackTie');
if(!$this->phpmailer->Send()){
echo 'mailer error: ' . $this->phpmailer->ErrorInfo;
}else{
echo 'msg sent';
}
这里的错误消息:
SMTP - >从服务器:
SMTP - >从服务器:
SMTP - > ERROR:EHLO不是从服务器所接受:
SMTP - > FROM SERVER:
SMTP - >错误:HELO未被s接受erver:
SMTP - > ERROR:AUTH不是从服务器接受:477你没有等待提示
SMTP - >从服务器:
SMTP - > ERROR:RSET失败: 邮件错误:SMTP错误:无法连接到SMTP主机。
您使用的是哪个版本的phpmailer?你可以发布一些PHP代码? – Cristian 2011-04-22 16:33:07
您是否试过telnet到服务器的相应端口(25等)以确保您可以手动发出这些命令并获得预期的响应? – dawebber 2011-04-22 16:39:22