Skip to content

Problem with 'remote_system_name'=>$var_name (Can't open mailbox with such a name) #254

Open
@JewerlyBony

Description

@JewerlyBony

When I try to assign a value to 'remote_system_name' with a variable I get this error :
Can't open mailbox with such a name (errflg=2)
Here is my simple code :

     $imapserver= "imap.myserver.com";
     ImapClient::setConnectAdvanced();
     ImapClient::setConnectConfig([
          'flags' => [
               'service' => ImapConnect::SERVICE_IMAP,
               'encrypt' => ImapConnect::ENCRYPT_SSL,
               'validateCertificates' => ImapConnect::VALIDATE_CERT
          ],
          'mailbox' => [
               'remote_system_name' => $imapserver,
               'port' => 993
          ],
          'connect' => [
               'username' => $info[0],
               'password' => $info[1]
          ]
     ]);
     $imap = new ImapClient();

But the code works fine when I write imap server directly like this

          'mailbox' => [
               'remote_system_name' => 'imap.myserver.com',
               'port' => 993
          ],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions