简体   繁体   English

SMTP 服务器响应:530 5.7.0 必须首先发出 STARTTLS 命令。 Windows 7的

[英]SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. windows 7

Well I'm using windows 7 and I am trying to send e-mail with mail() function in php.好吧,我使用的是 Windows 7,我正在尝试使用 php 中的 mail() 函数发送电子邮件。 I wrote and tried a lot but still can not send.我写了并尝试了很多但仍然无法发送。 This is my code:这是我的代码:

 ini_set("SMTP","smtp.gmail.com");
ini_set("smtp_port","25");


$to = 'asdf@gmail.com';
$subject = 'hi';
$msg = 'Test';
$headers ='Reply-To: shawn.danisa@gmail.com' . "\r\n" .
        'From: postmaster@localhost' ."\r\n" .
        'X-Mailer: PHP /' . phpversion();
mail($to, $subject,$msg,$headers);

and I get :我得到:

  SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. x42sm11770579eel.41 - gsmtp

I tried with port 587 but then I get :我尝试使用端口 587 但后来我得到:

    SMTP server response: 530 5.7.0 Must issue a STARTTLS command first.      y51sm11859758eeu.0 

Please help with port 465 my page even do not load.请帮助端口 465 我的页面甚至无法加载。 Again I am using windows 7.我再次使用 Windows 7。

使用像 Swiftmailer 这样的库来为你处理这个问题: http ://swiftmailer.org/docs/sending.html

暂无
暂无

声明:本站的技术帖子网页,遵循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 WampServer:警告:mail():SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令 - WampServer: Warning: mail(): SMTP server response: 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 ) php mail函数错误 - >警告: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 SMTP->错误:服务器未接受AUTH:530 5.7.0必须首先发出STARTTLS命令 - SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first 预期响应代码 250 但得到代码“530”,消息“530 5.7.0 必须先发出 STARTTLS 命令。g17sm239505vkg.44 - gsmtp” - Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first. g17sm239505vkg.44 - gsmtp " 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 PHPMailer:不接受来自服务器的MAIL:530 5.7.0必须首先发出STARTTLS命令 - PHPMailer : MAIL not accepted from server: 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 Symfony SwiftmailerBundle:Gmail 发送“530 5.7.0 必须先发出 STARTTLS 命令” - Symfony SwiftmailerBundle: Gmail sends “530 5.7.0 Must issue a STARTTLS command first”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM