dcblogdev / laravel-microsoft-graph

Laravel package for Microsoft Graph API (Microsoft365)

Home Page:https://dcblog.dev/docs/laravel-microsoft-graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Local issue

akauhovs opened this issue · comments

Realy good pacakge, but in first minutes I came to a problem, returning errors on contacts email etc.

Digging emails()->get() I see this:

 $folder = $folderId == null ? 'Inbox' : $folderId;
        //get inbox from folders list
        $folder = MsGraph::get("me/mailFolders?\$filter=startswith(displayName,'$folder')");

But my "Inbox" folder is in other language rather than english, and it returns error. So if we take a look to microsoft docs ->
GET /me/mailFolders/inbox

$folder = MsGraph::get("me/mailFolders/$folder");

Like so, everything works fine.
Maybe in future should think about it.

You should be able to provide the name of your inbox in your language as the first option:

$emails = MsGraph::emails()->get('your-inbox-name');

When no option is set then inbox will be used.