Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to Microsoft Office #4

Closed
KodaCHC opened this issue Aug 9, 2022 · 1 comment
Closed

Can't connect to Microsoft Office #4

KodaCHC opened this issue Aug 9, 2022 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@KodaCHC
Copy link

KodaCHC commented Aug 9, 2022

I am trying to connect to Microsoft right now.

$server = 'outlook.office365.com';
        $username = 'myusername';
        $token = 'xxxxxxx';

        require_once('./javanile/php-imap2/vendor/autoload.php');
        $mbh = imap2_open($server, $username, $token, OP_XOAUTH2);
        if (!$mbh) {
            error_log(imap_last_error());
            throw new \RuntimeException('Unable to open Google INBOX');
        }

Now i get this error Undefined array key "host"

The problem is the content of $mailboxParts

  1. I miss the first letter of Host :)
  2. No mailbox content or Port or other:

Array Content:

Array
(
    [path] => Array
        (
            [0] => utlook.office365.com
        )

    [mailbox] => 
)
@francescobianco francescobianco added the documentation Improvements or additions to documentation label Sep 15, 2022
@francescobianco francescobianco added this to the PHP 7.4 milestone Sep 15, 2022
@francescobianco
Copy link
Member

Hi @KodaCHC , please refer to this examples for the exact Microsoft Outlook solutions

@cjwnz cjwnz mentioned this issue Mar 23, 2023
kosta90s referenced this issue in arbor-education/php-imap2 Oct 30, 2023
from Elektroshop/php-imap2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

No branches or pull requests

2 participants