vendredi 28 septembre 2018

PHP script fails to use gmail to send an email

ERROR MESSAGE : Connection: opening to smtp.gmail.com:465, timeout=300, options=array()
2018-09-28 22:35:36 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.gmail.com:465 (Permission denied) [path/vendor/phpmailer/phpmailer/src/SMTP.php line 325]
2018-09-28 22:35:36 SMTP ERROR: Failed to connect to server: Permission denied (13)
SMTP connect() failed

I have tried to use the smtp IP address. I tried different ports, 25 and some other one. I am using a digital Ocean server. They confirmed that they are not blocking any ports.

I am suspicious of my gmail account. Turn on less secure app. Did the captchat unlock. maybe google is killing the request. I also tried a different email

I followed the github guide. I simply changed my username, password and the emails information. I am using centos 7. I feel like the script ran well but something else on the networking side.




Aucun commentaire:

Enregistrer un commentaire