Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29758

How to check if IMAP Webklex is connected or not connected

$
0
0

I'm having problems catching the error for the email webklex imap. i want to check if connected or not connected. credentials are correct, i only need to catch if the credentials are wrong or not connected.

Thanks.

$oClient = new Client([
    'host'          => 'imap.gmail.com',
    'port'          => $account_type['port'],
    'encryption'    => 'ssl',
    'validate_cert' => true,
    'username'      => $username,
    'password'      => $password,
    'protocol'      => 'imap'
]);
$oClient->connect();
if(){
//check if connected or not
}

Viewing all articles
Browse latest Browse all 29758

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>