• <small id='FaMun'></small><noframes id='FaMun'>

      <bdo id='FaMun'></bdo><ul id='FaMun'></ul>

        <legend id='FaMun'><style id='FaMun'><dir id='FaMun'><q id='FaMun'></q></dir></style></legend>
        <i id='FaMun'><tr id='FaMun'><dt id='FaMun'><q id='FaMun'><span id='FaMun'><b id='FaMun'><form id='FaMun'><ins id='FaMun'></ins><ul id='FaMun'></ul><sub id='FaMun'></sub></form><legend id='FaMun'></legend><bdo id='FaMun'><pre id='FaMun'><center id='FaMun'></center></pre></bdo></b><th id='FaMun'></th></span></q></dt></tr></i><div id='FaMun'><tfoot id='FaMun'></tfoot><dl id='FaMun'><fieldset id='FaMun'></fieldset></dl></div>

        <tfoot id='FaMun'></tfoot>

        smtp gmail服务器php邮件程序不工作

        时间:2024-08-23
        • <bdo id='5Inpk'></bdo><ul id='5Inpk'></ul>

                <small id='5Inpk'></small><noframes id='5Inpk'>

                <legend id='5Inpk'><style id='5Inpk'><dir id='5Inpk'><q id='5Inpk'></q></dir></style></legend>
                  <tbody id='5Inpk'></tbody>
              1. <tfoot id='5Inpk'></tfoot>

              2. <i id='5Inpk'><tr id='5Inpk'><dt id='5Inpk'><q id='5Inpk'><span id='5Inpk'><b id='5Inpk'><form id='5Inpk'><ins id='5Inpk'></ins><ul id='5Inpk'></ul><sub id='5Inpk'></sub></form><legend id='5Inpk'></legend><bdo id='5Inpk'><pre id='5Inpk'><center id='5Inpk'></center></pre></bdo></b><th id='5Inpk'></th></span></q></dt></tr></i><div id='5Inpk'><tfoot id='5Inpk'></tfoot><dl id='5Inpk'><fieldset id='5Inpk'></fieldset></dl></div>

                1. 本文介绍了smtp gmail服务器php邮件程序不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道这个问题已经被问过很多次了.但解决方案似乎对我没有帮助.所以我特此发布我的代码:

                  I know this question has been asked many a times before. But the solutions didn't seem to help me . So hereby I am posting my code:

                  <?php
                  require("class.phpmailer.php");
                  require("class.smtp.php");
                  $mail = new PHPMailer();
                  $mail->IsSMTP(); 
                  $mail->Host="smtp.gmail.com";
                  $mail->SMTPDebug=1; 
                  $mail->SMTPAuth=true;
                  $mail->SMTPSecure="ssl";
                  $mail->Port=465;  
                  $mail->Username ="me@gmail.com";
                  $mail->Password="mypassword";
                  $mail->AddAddress("to@yahoo.co.in");
                  $mail->SetFrom("me@gmail.com", "myname");
                  $mail->AddReplyTo("someone@gmail.com","someone");
                  $mail->Subject="Greetings from ME";
                  $mail->Body="Greeting !! I am glad you received this message";
                  $mail->WordWrap=50;
                  if($mail->send())
                  {
                  echo "Mail sent successfully";
                  }
                  else
                  {
                  echo "Sorry mail could not be sent because of error ".$mail->ErrorInfo;
                  }
                  ?>
                  

                  SMTP 调试是:

                  CLIENT -> SERVER: EHLO messengerclick.byethost3.com 2015-07-26 12:49:42 CLIENT -> SERVER: AUTH LOGIN 2015-07-26 12:49:42    
                  CLIENT -> SERVER: Y2hlcm9ja3oxOUBnbWFpbC5jb20= 2015-07-26 12:49:42  
                  CLIENT -> SERVER: Y2hldGFucm9ja3MxOQ== 2015-07-26 12:49:43  
                  SMTP ERROR: Password command failed: 534-5.7.14 Please log in via your web browser and 534-5.7.14 then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 sc16sm22415466wjb.28 - gsmtp 2015-07-26 12:49:43 
                  SMTP Error: Could not authenticate. 2015-07-26 12:49:43 
                  CLIENT -> SERVER: QUIT 2015-07-26 12:49:43  SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Sorry mail could not be sent because of error SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
                  

                  我已在我的 gmail 帐户上启用了对未知应用的访问权限.我还单击了此链接上的继续http://www.google.com/accounts/DisplayUnlockCaptcha登录后.我从我的 byethost 帐户运行它.它适用于 smtp.mail.yahoo.com

                  I have enabled access for unknown apps on my gmail account. I have also clicked on continue on this link http://www.google.com/accounts/DisplayUnlockCaptcha after signing in. I am running this from my byethost account. It is working fine for smtp.mail.yahoo.com

                  请帮助我知道我做错了什么.

                  Please help me know what I am doing wrong.

                  推荐答案

                  如果您确定您的密码正确,您可以尝试以下故障排除提示:

                  If you’re sure your password is correct, you can try these troubleshooting tips:

                  • 如果您为自己的帐户开启了两步验证,您可能需要输入应用密码.
                  • 通过 https://mail.google.com 从网络版 Gmail 登录您的帐户.然后尝试访问您的消息再次使用您的邮件应用.
                  • 如果您仍有问题,请访问 http://www.google.com/accounts/DisplayUnlockCaptcha 并登录您的 Gmail 用户名和密码.如有必要,输入字母扭曲的图片.
                  • 您的邮件应用可能不支持最新的安全标准.了解如何允许不太安全的应用访问您的帐户.
                  • 确保您的邮件应用未设置为过于频繁地检查新电子邮件.如果您的邮件应用程序多次检查新邮件每 10 分钟,该应用就可能会被阻止访问您的帐户.
                  • 尝试根据我们关于创建强密码的提示更改您的密码.
                  • If you've turned on 2-Step Verification for your account, you might need to enter an App password.
                  • Sign in to your account from the web version of Gmail at https://mail.google.com. Afterwards try accessing your messages in your mail app again.
                  • If you're still having problems, visit http://www.google.com/accounts/DisplayUnlockCaptcha and sign in with your Gmail username and password. If necessary, enter the letters in the distorted picture.
                  • Your mail app might not support the latest security standards. Learn how to allow less secure apps access to your account.
                  • Make sure your mail app isn't set to check for new email too frequently. If your mail app checks for new messages more than once every 10 minutes, the app’s access to your account could be blocked.
                  • Try changing your password according to our tips on creating a strong password.

                  来源.

                  这里,您可以允许安全性较低的应用.单击打开以允许安全性较低的应用使用您的用户名和密码.

                  Here, you can allow less secure apps. Click on Turn On to allow less secure apps having your username and password.

                  这篇关于smtp gmail服务器php邮件程序不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:当我通过其他 SMTP 服务器发送电子邮件时,电子邮件进入垃圾邮件 下一篇:关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题

                  相关文章

                  <tfoot id='mrdLp'></tfoot>

                2. <legend id='mrdLp'><style id='mrdLp'><dir id='mrdLp'><q id='mrdLp'></q></dir></style></legend>

                3. <i id='mrdLp'><tr id='mrdLp'><dt id='mrdLp'><q id='mrdLp'><span id='mrdLp'><b id='mrdLp'><form id='mrdLp'><ins id='mrdLp'></ins><ul id='mrdLp'></ul><sub id='mrdLp'></sub></form><legend id='mrdLp'></legend><bdo id='mrdLp'><pre id='mrdLp'><center id='mrdLp'></center></pre></bdo></b><th id='mrdLp'></th></span></q></dt></tr></i><div id='mrdLp'><tfoot id='mrdLp'></tfoot><dl id='mrdLp'><fieldset id='mrdLp'></fieldset></dl></div>

                      <bdo id='mrdLp'></bdo><ul id='mrdLp'></ul>

                      <small id='mrdLp'></small><noframes id='mrdLp'>