I have enabled OpenSSL
and IMAP
functions from my php.ini
file and phpinfo()
confirms it.
By using the code below
UPDATE:
After searching for my problem on the Internet, i did not found a solution that solves my problem completely. Although if
1) I use the insecure $connect_to = '{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX';
2)And allow gmail to be accessed by less secured apps
,
solves my problem for now.
Please check this https://support.google.com/accounts/answer/6010255?hl=en