Email collector(365): Search string not understood

Hi,

I set up the email collector for Outlook365, but it throws the following error:

Search string not understood - [BADCHARSET (US-ASCII)] The specified charset is not supported

Not sure if matters, but in file emailcollector.class.php, the connection string is configured like this:

public function getConnectStringIMAP()
{
// Connect to IMAP
$flags =’/imap’;
$flags.=’/ssl’;
$flags.=’/novalidate-cert’;
$connectstringserver = ‘{’.$this->host.’:993’.$flags.’}’;
return $connectstringserver;
}

I’m unsure how to start trouble shooting. Is this a problem because of my PHP version, or is it an issue between Dolibarr and Outlook365?

I found this link where they seem to discuss this very issue, but I’m no PHP programmer, it’s a bit beyond me.

Thanks for any help!

Figured it out. In file ./emailcollector/class/emailcollector.class.php, I changed

    $arrayofemail= imap_search($connection, $search, null, "[color=#ff0000]UTF-8[/color]");

to

    $arrayofemail= imap_search($connection, $search, null, "[color=#ff0000]US-ASCII[/color]");

It works now with Outlook365

1 Like

I pushed this fix for v12 so you can set the charset into your collector