google workspace - php imap access with gsuite


I am able to use imap_open() with a standard[email protected] address, however I have another account which is using gsuite, so I have a[email protected] address, which will not connect.

I have enabled imap access on the gsuite account.

I have enabled "less secure apps" on the gsuite account.

$username_A = '[email protected]'
$username_B = '[email protected]'
$hostname = '{}INBOX';
$inbox_A = imap_open($hostname,$username_A,$password)
$inbox_B = imap_open($hostname,$username_B,$password)

What else do I need to do in order to enable imap access via php to my Gsuite account?

People are also looking for solutions to the problem: php - Google Sheets Error


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.