Skip to content

Unable to add multiple flags #225

Description

@vajiralasantha

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", "some@email.com");
$server->setFlag("user", "shared@email.com");

The server string comes as
{outlook.office365.com:993/ssl/user=shared@email.com}

The string I suppose to get is
{outlook.office365.com:993/ssl/authuser=some@email.com/user=shared@email.com}

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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