PHP Mailer with Gmail SMTP works one day and stops the next day
Hello,
I have an issue with sending emails using PHPMailer + Gmail SMTP:
I have exactly the same code from PHPMailer using smtp.gmail.com and 587 port with TLS.
When I do a grace reboot and run the script it works fine and sends the email immediately without an issue. (I am also testing it with smtp.yandex.com it works as well).
However, the next day when I run the same script I got "SMTP connect () failed." error.
Any ideas how to debug this issue? I do not want to reboot the server everyday.
Thanks in advance for your suggestions.
Sincerely,
Aslan Ozcakir
-
I solved using this tips > CSF firewall configuration > smtp setting > whitelist users in variable "SMTP_ALLOWUSER smtp_allowuser : cpanel,myuser ( user is ftp login domain ) Gmail SMTP work fine for me now ! 0 -
Hello, I'm glad to see you were able to solve the issue. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
3 comments