Fetch icon indicating copy to clipboard operation
Fetch copied to clipboard

Unable to add multiple flags

Open vajiralasantha opened this issue 6 years ago • 1 comments

I'm trying to set two flags to connect to a shared inbox. However when I use following commands, Only one flag get set.

$server = new Server($config->mailserver->host, $config->mailserver->port);
$server->setAuthentication(USER_NAME, PASSWORD);
$server->setFlag("authuser", "[email protected]");
$server->setFlag("user", "[email protected]");

The server string comes as {outlook.office365.com:993/ssl/[email protected]}

The string I suppose to get is {outlook.office365.com:993/ssl/[email protected]/[email protected]}

looks like this issue is caused by following piece of code in function setFlag() .

$match = preg_grep('/' . $flag . '/', $this->flags);
if (reset($match)) {
      $this->flags[key($match)] = $flag . '=' . $value;
} else {
      $this->flags[] = $flag . '=' . $value;
}

Any idea?

vajiralasantha avatar Jan 15 '20 03:01 vajiralasantha

Simple workaround for this, if you use $server->setFlag("[email protected]/[email protected]"); it should work too.

Woodehh avatar Jul 17 '20 10:07 Woodehh