Open JewerlyBony opened 4 years ago
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 :
Can't open mailbox with such a name (errflg=2)
$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 ],
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 :But the code works fine when I write imap server directly like this