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

Unable to add multiple flags #225

Open
vajiralasantha opened this issue Jan 15, 2020 · 1 comment
Open

Unable to add multiple flags #225

vajiralasantha opened this issue Jan 15, 2020 · 1 comment

Comments

@vajiralasantha
Copy link

vajiralasantha commented Jan 15, 2020

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?

@Woodehh
Copy link

Woodehh commented Jul 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants