PHP邮件程序SMTP - >错误:RSET失败

时间:2016-10-27 20:14:13

标签: php email phpmailer

迁移到新服务器后,我在PHPMailer中遇到问题..

我有问题和调试输出显示如下

SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "220 Ready to start TLS. " 
SMTP -> get_lines(): $data is "220 Ready to start TLS. " 
SMTP -> FROM SERVER:220 Ready to start TLS. 
SMTP -> FROM SERVER: 
SMTP -> ERROR: RSET failed: 
Language string failed to load: tls

这是我的PHP脚本

$email = 'test@gmail.com';
$message = 'test test test';
$subject = 'test';

    function send_mail($email,$message,$subject)
        {                       
            require_once('mailer/class.phpmailer.php');

            $mail = new PHPMailer();
            $mail->IsSMTP();
            $mail->SMTPDebug  = 4;
            $mail->SMTPAuth   = true;
            $mail->SMTPSecure = "tls";
            $mail->Host       = "smtp.zoho.com";
            $mail->Port       = 587;
            $mail->AddAddress($email);
            $mail->Username="admin@domain.com";
            $mail->Password="xxxxx";
            $mail->SetFrom('admin@domain.com','domain');
            $mail->AddReplyTo("admin@domain.com","domain");
            $mail->Subject    = $subject;
            $mail->MsgHTML($message);
            $mail->Send();
        }

    send_mail($email,$message,$subject); 

请帮我解决这个问题。谢谢:)

0 个答案:

没有答案