Skip to content

Commit bae34e6

Browse files
committed
Add mailbox import
Closes #43
1 parent 4d824c3 commit bae34e6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

readme.md

+18
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ ImapEngine provides a simple, fluent API for working with IMAP mailboxes, messag
4646
To connect to a mailbox, create a new `Mailbox` instance with the configuration options:
4747

4848
```php
49+
use DirectoryTree\ImapEngine\Mailbox;
50+
4951
$mailbox = new Mailbox([
5052
'port' => 993,
5153
'username' => '...',
@@ -58,6 +60,8 @@ $mailbox = new Mailbox([
5860
To connect using an OAuth token, pass the token as the password, and set the `authentication` method to `oauth`:
5961

6062
```php
63+
use DirectoryTree\ImapEngine\Mailbox;
64+
6165
$token = '...';
6266

6367
$mailbox = new Mailbox([
@@ -73,6 +77,8 @@ $mailbox = new Mailbox([
7377
To connect using plain (without encryption) or starttls, set the `encryption` option to `starttls`:
7478

7579
```php
80+
use DirectoryTree\ImapEngine\Mailbox;
81+
7682
$mailbox = new Mailbox([
7783
'port' => 143,
7884
'encryption' => 'starttls',
@@ -85,6 +91,8 @@ $mailbox = new Mailbox([
8591
There are also many other configuration options available you may find useful:
8692

8793
```php
94+
use DirectoryTree\ImapEngine\Mailbox;
95+
8896
$mailbox = new Mailbox([
8997
'port' => 993,
9098
'host' => '',
@@ -115,6 +123,8 @@ It accepts the following values:
115123
- `true` – Enables debugging using an `EchoLogger`, which outputs debug messages to the console
116124

117125
```php
126+
use DirectoryTree\ImapEngine\Mailbox;
127+
118128
// No debug output.
119129
$mailbox = new Mailbox([
120130
// ...
@@ -132,6 +142,8 @@ $mailbox = new Mailbox([
132142
When set to a file path (e.g., `'/path/to/log/file.log'`), a `FileLogger` is instantiated to write debug messages to the specified file.
133143

134144
```php
145+
use DirectoryTree\ImapEngine\Mailbox;
146+
135147
// Output debug messages to a file.
136148
$mailbox = new Mailbox([
137149
// ...
@@ -145,6 +157,8 @@ If provided with a fully-qualified class name (and the class exists), an instanc
145157
The class must implement `DirectoryTree\ImapEngine\Connection\Loggers\LoggerInterface`.
146158

147159
```php
160+
namespace App\Loggers;
161+
148162
use DirectoryTree\ImapEngine\Connection\Loggers\LoggerInterface;
149163

150164
class CustomLogger implements LoggerInterface
@@ -168,6 +182,9 @@ class CustomLogger implements LoggerInterface
168182
```
169183

170184
```php
185+
use App\Loggers\CustomLogger;
186+
use DirectoryTree\ImapEngine\Mailbox;
187+
171188
$mailbox = new Mailbox([
172189
// ...
173190
'debug' => CustomLogger::class,
@@ -177,6 +194,7 @@ $mailbox = new Mailbox([
177194
Or, if you use [Spatie Ray](https://spatie.be/products/ray), you may use the built in `RayLogger`:
178195

179196
```php
197+
use DirectoryTree\ImapEngine\Mailbox;
180198
use DirectoryTree\ImapEngine\Connection\Loggers\RayLogger;
181199

182200
$mailbox = new Mailbox([

0 commit comments

Comments
 (0)