generated from Nodarx/template
refactor: use custom imap client
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -188,10 +188,13 @@ class Provider implements ProviderServiceMutateInterface, ProviderServiceDiscove
|
||||
if (!($service instanceof Service)) {
|
||||
throw new \InvalidArgumentException('Service must be an instance of IMAP Service');
|
||||
}
|
||||
// augment the service with any provided test options (e.g. override location or credentials)
|
||||
$service->fromStore(['sid' => 'test']);
|
||||
|
||||
// Attempt to authenticate and list mailboxes as a connectivity check
|
||||
$wrapper = RemoteService::freshClient($service);
|
||||
$mailboxes = $wrapper->mailboxes();
|
||||
$client = RemoteService::freshClient($service);
|
||||
$service = RemoteService::mailService($service, $client);
|
||||
$mailboxes = $service->collectionList();
|
||||
|
||||
$latency = (int) round((microtime(true) - $startTime) * 1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user