Skip to content

Instantly share code, notes, and snippets.

@tflight
Created March 21, 2018 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tflight/10ab5ea32a5081d6acd96af48313d130 to your computer and use it in GitHub Desktop.
Save tflight/10ab5ea32a5081d6acd96af48313d130 to your computer and use it in GitHub Desktop.
<?php
require __DIR__ . '/vendor/autoload.php';
$auth_factory = new \Aura\Auth\AuthFactory($_COOKIE);
$auth = $auth_factory->newInstance();
$imap_adapter = $auth_factory->newImapAdapter(
'{mail.example.com:993/imap/ssl}'
);
$loginService = $auth_factory->newLoginService($imap_adapter);
$loginService->login($auth, [
'username' => 'username',
'password' => 'password'
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment