我得到这个错误(phplist电子邮件不发送webmaster@fall-pac.com:名为邮件()没有连接)自从升级我phplist什么已经改变我有发送一个测试邮件从实际的smtp邮件盒子,这工作我知道它不是邮件地址我认为它必须有空在config . php文件但黑话似乎找到可能造成这个问题的任何帮助就太好了请参阅我config . php穿上pastbin作为其大把http://pastebin.com/CjRKdu5H
<?php
require("PHPMailer/class.phpmailer.php");
$mail = new PHPMailer(); // create a new object
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 0; // debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; // authentication enabled
$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
//if $mail->SMTPSecure = 'tls';
// use $mail->Port = 465;
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465;
$mail->Username = 'username';
$mail->Password = 'password';
$mail->SetFrom('xyz@some.com', 'Testing');
$mail->Subject = 'Yii Test';
$mail->Body = "hello";
$mail->AddAddress('xyz@some.com');
if(!$mail->Send()) {
$error = 'Mail error: '.$mail->ErrorInfo;
return false;
} else {
echo $error = 'Message sent!';
return true;
}
?>