带有OVH正确配置的PHPMailer配置,但不起作用

时间:2018-09-05 21:54:17

标签: php forms email smtp phpmailer

我的PHPMailer脚本出现问题。它在我的OVH Hoster上不起作用,我不知道为什么。密码和电子邮件的所有内容都可以,我使用的端口正确,等等。但是我总是会遇到很多错误。

邮件脚本:

<?php


$betreff=$_POST["betreff"];
$kundenname=$_POST["kundenname"];
$kundenemail=$_POST["kundenemail"];
$nachricht=$_POST["nachricht"];


require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->isSMTP();
$mail->IsHTML(true); 
$mail->SMTPAuth = true;
$mail->SMTPDebug = 4;
$mail->SMTPKeepAlive = true;
$mail->Host = 'ssl0.ovh.net';
$mail->Username = 'TEST-USER@dot-com.de';
$mail->Password = 'password';
$mail->SMTPSecure = 'ssl';
$mail->Port = "465";
$mail->CharSet = 'UTF-8';
$mail->From = "TEST-USER@dot-com.de";
$mail->FromName = $kundenname;
$mail->AddReplyTo($kundenemail, $kundenname);
$mail->Subject = $betreff;
$mail->Body = $nachricht;
$i=0;
$a=array("TEST-USER@dot-com.de", "xxyyzz@gmail.com", "xx.xx.xx@gmail.com");
while ($i< 3){
$mail->AddAddress($a[$i]);
$mail->Send();
$mail->ClearAddresses();
$i++;
}

 echo"mail send";

?>

错误消息:

    SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "220 ssl0.ovh.net player773 " 
SMTP -> get_lines(): $data is "220 ssl0.ovh.net player773 " 
SMTP -> FROM SERVER:220 ssl0.ovh.net player773 
SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "250-player773.ha.ovh.net " 
SMTP -> get_lines(): $data is "250-player773.ha.ovh.net " 
SMTP -> get_lines(): $data was "250-player773.ha.ovh.net " 
SMTP -> get_lines(): $str is "250-SIZE 104857600 " 
SMTP -> get_lines(): $data is "250-player773.ha.ovh.net 250-SIZE 104857600 " 
SMTP -> get_lines(): $data was "250-player773.ha.ovh.net 250-SIZE 104857600 " 
SMTP -> get_lines(): $str is "250-AUTH PLAIN LOGIN " 
SMTP -> get_lines(): $data is "250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN " 
SMTP -> get_lines(): $data was "250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN " 
SMTP -> get_lines(): $str is "250-AUTH=PLAIN LOGIN " 
SMTP -> get_lines(): $data is "250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN " 
SMTP -> get_lines(): $data was "250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN " 
SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES " 
SMTP -> get_lines(): $data is "250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES " 
SMTP -> get_lines(): $data was "250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES " 
SMTP -> get_lines(): $str is "250 8BITMIME " 
SMTP -> get_lines(): $data is "250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250 8BITMIME " 
SMTP -> FROM SERVER: 250-player773.ha.ovh.net 250-SIZE 104857600 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250 8BITMIME 
SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6 " 
SMTP -> get_lines(): $data is "334 VXNlcm5hbWU6 " 
SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6 " 
SMTP -> get_lines(): $data is "334 UGFzc3dvcmQ6 " 
SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " 
SMTP -> get_lines(): $data is "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " 
SMTP -> ERROR: Password not accepted from server: 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 
SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "250 2.0.0 Ok " 
SMTP -> get_lines(): $data is "250 2.0.0 Ok " 
SMTP -> FROM SERVER:250 2.0.0 Ok 
SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "250 2.1.0 Ok " 
SMTP -> get_lines(): $data is "250 2.1.0 Ok " 
SMTP -> FROM SERVER:250 2.1.0 Ok 
SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "554 5.7.1 : Client host rejected: Access denied " 
SMTP -> get_lines(): $data is "554 5.7.1 : Client host rejected: Access denied " 
SMTP -> FROM SERVER:554 5.7.1 : Client host rejected: Access denied 
SMTP -> ERROR: RCPT not accepted from server: 554 5.7.1 : Client host rejected: Access denied 
SMTP Error: The following recipients failed: webseiten-webshops@kostenvoranschlag-angebote.de SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "" 
SMTP -> get_lines(): $data is "" 
SMTP -> get_lines(): timed-out (10 seconds) 
SMTP -> FROM SERVER: 
SMTP -> ERROR: MAIL not accepted from server: 
The following From address failed: xxx-xx@xx-xx.de : MAIL not accepted from server,,
SMTP server error:

SMTP -> get_lines(): $data was "" 
SMTP -> get_lines(): $str is "" 
SMTP -> get_lines(): $data is "" 
SMTP -> get_lines(): timed-out (10 seconds) 
SMTP -> FROM SERVER: 
SMTP -> ERROR: MAIL not accepted from server: 
The following From address failed: xx-xx@xx-xx.de : MAIL not accepted from server,,
SMTP server error:

mail send

每次尝试使用脚本发送邮件时,都会出现这些错误。

0 个答案:

没有答案