gmail继续阻止PHPmailer登录

编程入门 行业动态 更新时间:2024-10-08 20:29:15
本文介绍了gmail继续阻止PHPmailer登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将在接下来的8小时内部署一个网站,Gmail只是停止接受PHPmailer登录到我的帐户.最初,它在测试过程中工作了几个小时.然后,它停止了工作..我已经允许所有允许安全程度较低的应用从gmail登录,但仍然不允许phpmailer登录.我想跳下悬崖!

I'm about to deploy a website in the next 8h and Gmail just stop accepting PHPmailer sign in to my account. At first it worked, for a bunch of hours while testing. Then, it just stopped working.. I already allowed all the allow less secure apps to sign in from gmail but it just still don't allow phpmailer to sign in. I want to jump off a cliff!

以下是几个小时前出色的代码:

Here is the same code that worked brilliant a few hours ago:

$mail->SMTPDebug = 0; $mail->isSMTP(); $mail->Host = "smtp.gmail"; $mail->SMTPAuth = true; $mail->Username = 'myemail@gmail'; $mail->Password = 'password'; $mail->SMTPSecure = 'ssl'; $mail->Port = 587;

然后出于某些原因,Gmail刚刚开始尝试阻止登录.我希望我能在这里得到一些帮助,我已经寻找了一个多小时,但仍然一无所获.

Then for some reason gmail just started blocking the sign in attemps. I hope I could get some help here, I already looked for over an hour and still got nothing.

谢谢!

推荐答案

已解决!我希望这会在将来对其他人有所帮助.即使我启用了gmail"访问较不安全的应用程序",它仍然拒绝了PHPmailer登录. ,至少对我来说如此,所以我将其切换为465,一切开始正常进行.

Resolved! I hope this helps others in the future.. Even though I enabled gmail "access to less secure apps" it kept rejecting the PHPmailer sign in.. Seems that for some reason gmail wasn't accepting port 587, at least for me, so I switched it to 465 and everything started working right a way.

作为此答案的一个加分,至于@Amit Merchant在评论部分中建议的内容,我不知道stackoverflow/a/33667250/1485183中的最后一条评论是什么,它基本上显示了gmail功能寻找问题的解决方案时,我从未发现或听到以下消息:accounts.google/DisplayUnlockCaptcha

As a plus for this answer, as for what @Amit Merchant suggested in the comment section, I wasn't aware of what the last comment in stackoverflow/a/33667250/1485183 says, it basically shows a gmail feature I never found or heard when looking for a solution for my problem, that this: accounts.google/DisplayUnlockCaptcha

我确定,不管是用于phpmailer还是任何其他库,这有一天都会对某人有所帮助.

I'm sure this will help someone some day whether if it's for phpmailer or any other library.

更多推荐

gmail继续阻止PHPmailer登录

本文发布于:2023-11-09 23:26:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573732.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:gmail   PHPmailer

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!