简体   繁体   English

SMTP->错误:服务器未接受AUTH:530 5.7.0必须首先发出STARTTLS命令

[英]SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first

<?php
require("class.phpmailer.php");
require("class.smtp.php");
require("class.pop3.php");

$mail = new PHPMailer();

$mail->IsSMTP();                                      // set mailer to use      SMTP
$mail->Host = "smtp.mail.yahoo.com";  // specify main and backup server
$mail->SMTPSecure = "SSL";
$mail->SMTPKeepAlive = true;
$mail->Port = "587";
$mail->SMTPAuth = true;     // turn on SMTP authentication
$mail->SMTPDebug = 1;
$mail->Username = "abc@yahoo.com";  // SMTP username
$mail->Password = "xyz"; // SMTP password



$mail->From = "abc@yahoo.com";
$mail->FromName = "Prashant kumar";
$mail->AddAddress("pqr@gmail.com", "Yogesh");                 // name is    optional
$mail->AddReplyTo("mno@gmail.com", "Information");

$mail->WordWrap = 50;                                 // set word wrap to 50 characters
$mail->IsHTML(true);                                  // set email format to HTML

$mail->Subject = "Here is the subject";
$mail->Body    = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";

if(!$mail->Send())
{
   echo "Message could not be sent. <p>";
   echo "Mailer Error: " . $mail->ErrorInfo;
   exit;
}

echo "Message has been sent";
?>

Trying from last 2 days, getting the error as 从最近2天开始尝试,得到的错误为

SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first SMTP->错误:服务器未接受AUTH:530 5.7.0必须首先发出STARTTLS命令

SMTP Error: Could not authenticate. SMTP错误:无法验证。 Message could not be sent. 无法发送信息。

Mailer Error: SMTP Error: Could not authenticate. 邮件错误:SMTP错误:无法验证。

Already seen all possible questions in stackoverflow and other websites. 已经在stackoverflow和其他网站中看到了所有可能的问题。 Already changed SMTPSecure and Port to all possible values. 已经将SMTPSecure和Port更改为所有可能的值。 Tried gmail server and outlook server also. 尝试了Gmail服务器和Outlook服务器。 Changed SMTPsecure to STARTTLS and TLS also with respective ports. 还将具有相应端口的SMTPsecure更改为STARTTLS和TLS。 Removed SMTPAuth line also. 还删除了SMTPAuth行。 Tried every possible soultions i found through web. 尝试了所有我通过网络发现的可能的灵魂。

Is this because i am trying to run this on my localhost? 这是因为我试图在本地主机上运行它吗? (i am using XAMPP in windows 8, 64 bit) (我在Windows 8、64位操作系统中使用XAMPP)

Try using $mail->Port = 465; 尝试使用$ mail-> Port = 465; instead of 587 and check the difference in the below link. 而不是587,然后检查以下链接中的差异。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令 - SMTP server response: 530 5.7.0 Must issue a STARTTLS command first PHPMailer:不接受来自服务器的MAIL:530 5.7.0必须首先发出STARTTLS命令 - PHPMailer : MAIL not accepted from server: 530 5.7.0 Must issue a STARTTLS command first SMTP 错误:MAIL FROM 命令失败:530 5.7.0 使用 PHPMailer 时必须先发出 STARTTLS 命令 - SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer SMTP 服务器响应:530 5.7.0 必须首先发出 STARTTLS 命令。 Windows 7的 - SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. windows 7 php mail函数错误 - &gt;警告:mail()[function.mail]:SMTP服务器响应:530 5.7.0必须先发出STARTTLS命令 - php mail function error -> Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first WampServer:警告:mail():SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令 - WampServer: Warning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first 无法发送 AUTH LOGIN 命令。 错误:530 5.7.0 必须先发出 STARTTLS 命令 - Failed to send AUTH LOGIN command. Error: 530 5.7.0 Must issue a STARTTLS command first 如何解决此错误( mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. i2sm7399406pjt.19 - gsmtp ) - How solve this error ( mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. i2sm7399406pjt.19 - gsmtp ) Symfony SwiftmailerBundle:Gmail 发送“530 5.7.0 必须先发出 STARTTLS 命令” - Symfony SwiftmailerBundle: Gmail sends “530 5.7.0 Must issue a STARTTLS command first” PHP SMTP 错误:SMTP 服务器响应:530 5.7.0 - PHP SMTP ERROR: SMTP server response: 530 5.7.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM