Good day everybody,
I hope that someone can help me here... I'm trying to retrieve my mails via PHP script... I used the following script as a template: [https://phppot.com/php/gmail-email-inbox-using-php-with-imap/][1]
In addition, I activated IMAP in the Google settings, activated two-factor authentication and created an app password.
I then uploaded the whole script to my server (IMAP is activated in php.ini)... but I still get the message:
Cannot connect to Gmail: Can't connect to imap.gmail.com,993: Connection refused
I also tried the following:
{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX and
{imap.gmail.com:993/imap/ssl}INBOX
I would be happy if I got an answer :)