Skip to content

Commit f456cbb

Browse files
committed
Examples updated
1 parent 7ff711f commit f456cbb

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

README.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Webklex\IMAP\Providers\LaravelServiceProvider::class,
7373
php artisan vendor:publish --provider="Webklex\IMAP\Providers\LaravelServiceProvider"
7474
```
7575

76-
7776
## Configuration
7877
If you are planning to use a single account, you might want to add the following to
7978
your `.env` file.
@@ -99,9 +98,8 @@ and will move every message into INBOX.read. Please be aware that this should no
9998
tested in real life and is only meant to gives an impression on how things work.
10099

101100
```php
102-
use Webklex\PHPIMAP\Client;
103-
104-
$client = new Client([
101+
/** @var \Webklex\PHPIMAP\Client $client */
102+
$client = Webklex\IMAP\Facades\Client::make([
105103
'host' => 'somehost.com',
106104
'port' => 993,
107105
'encryption' => 'ssl',
@@ -183,18 +181,16 @@ $folder->idle(function($message){
183181
If you are using google mail or something similar, you might have to use oauth instead:
184182

185183
```php
186-
use Webklex\PHPIMAP\Client;
187-
188184
/** @var \Webklex\PHPIMAP\Client $client */
189-
$client = new Client([
190-
'host' => 'imap.gmail.com',
191-
'port' => 993,
192-
'encryption' => 'ssl',
185+
$client = Webklex\IMAP\Facades\Client::make([
186+
'host' => 'somehost.com',
187+
'port' => 993,
188+
'encryption' => 'ssl',
193189
'validate_cert' => true,
194-
'username' => '[email protected]',
195-
'password' => 'PASSWORD',
190+
'username' => '[email protected]',
191+
'password' => 'password',
196192
'authentication' => "oauth",
197-
'protocol' => 'imap'
193+
'protocol' => 'imap'
198194
]);
199195

200196
//Connect to the IMAP Server

0 commit comments

Comments
 (0)