Skip to content

Probleme with plugin #114

@lheureuxj2

Description

@lheureuxj2

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

GLPI Version

11.0.2

Plugin version

1.5.0

Bug description

Hi,

I’m using GLPI with the OAuth IMAP plugin to connect an Exchange Online (Microsoft 365) mailbox using OAuth2.

The authentication works correctly, but the mail collector cannot open the inbox folder when the mailbox language is French. The plugin tries to select the folder named “Boîte de réception”, however the real IMAP folder name on Exchange is “INBOX”.

As a result, the collector fails with:
"cannot change folder, maybe it does not exist"

Log example:
Laminas\Mail\Storage\Exception\RuntimeException: cannot change folder

If I change the mailbox language to English or manually use "INBOX", the mail collector works correctly.

Expected behavior:
The plugin should use the IMAP folder name (e.g., “INBOX”), not the localized display name (“Boîte de réception”), or allow forcing the IMAP folder name in the collector configuration.

Thanks.

Relevant log output

[2025-11-05 19:11:28] glpi.ERROR:   *** Caught Laminas\Mail\Storage\Exception\Ru                                                 ntimeException: cannot change folder, maybe it does not exist
  Backtrace :
  ...r/laminas/laminas-mail/src/Storage/Imap.php:404
  ...authimap/inc/imap/imapoauthstorage.class.php:82 Laminas\Mail\Storage\Imap->                                                 selectFolder()
  ...oauthimap/inc/mailcollectorfeature.class.php:97 GlpiPlugin\Oauthimap\Imap\I                                                 mapOauthStorage->__construct()
  ./src/Toolbox.php:2013                             GlpiPlugin\Oauthimap\MailCo                                                 llectorFeature::GlpiPlugin\Oauthimap\{closure}()
  ./src/MailCollector.php:1285                       Toolbox::getMailServerStora                                                 geInstance()
  ./src/MailCollector.php:584                        MailCollector->connect()
  ./src/MailCollector.php:1813                       MailCollector->collect()
  ./src/CronTask.php:885                             MailCollector::cronMailgate                                                 ()
  ./front/cron.php:165                               CronTask::launch()
  ./vendor/symfony/http-kernel/HttpKernel.php:101    Glpi\Controller\LegacyFileL                                                 oadController->{closure}()
  ...ymfony/http-foundation/StreamedResponse.php:106 Symfony\Component\HttpKerne                                                 l\HttpKernel::Symfony\Component\HttpKernel\{closure}()
  ./vendor/symfony/http-foundation/Response.php:423  Symfony\Component\HttpFound                                                 ation\StreamedResponse->sendContent()
  ./src/Glpi/Kernel/Kernel.php:295                   Symfony\Component\HttpFound                                                 ation\Response->send()
  ./public/index.php:72                              Glpi\Kernel\Kernel->sendRes

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions