php-imap
php-imap copied to clipboard
access shared mail
How can I access shared emails in Outlook?
Hi @caalber999 ,
I'm not to familiar with outlook. Do you mean shared folders? Have you checked if they are listed if you dump var_dump($client->getFolders()) ? Perhaps their name or path are a bit strange.
Best regards,
Hi, think he want's to access an shared mailbox. Im looking for that myself. In regular PHP imap you can connect to using the following connection string
{outlook.office365.com:993/imap/ssl/[email protected]/[email protected]}
Now you login using your personal account, but access and shared mailbox.
Hi, i was struggling with the very same problem.
Create the access token on behalf of your regular user and then use the address of the shared mailbox to login.
$client = $cm->make([
'host' => 'outlook.office365.com',
'port' => 993,
'encryption' => 'ssl',
'validate_cert' => true,
'username' => '[email protected],
'password' => $password,
'protocol' => 'imap',
'authentication' => "oauth",
]);
still it cant connect may email is [email protected]