Skip to content

Commit 7a54b2c

Browse files
committed
Additional search information added
1 parent 265790b commit 7a54b2c

File tree

1 file changed

+48
-17
lines changed

1 file changed

+48
-17
lines changed

README.md

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,33 @@ Laravel IMAP is an easy way to integrate the native php imap library into your *
3030

3131
## Installation
3232

33-
1) Install the php-imap library if it isn't already installed:
33+
1. Install the php-imap library if it isn't already installed:
3434

3535
``` shell
3636
sudo apt-get install php*-imap && sudo apache2ctl graceful
3737
```
3838

3939
You might also want to check `phpinfo()` if the extension is enabled.
4040

41-
2) Now install the Laravel IMAP package by running the following command:
41+
2. Now install the Laravel IMAP package by running the following command:
4242

4343
``` shell
4444
composer require webklex/laravel-imap
4545
```
4646

47-
3) Open your `config/app.php` file and add the following to the `providers` array:
47+
3. Open your `config/app.php` file and add the following to the `providers` array:
4848

4949
``` php
5050
Webklex\IMAP\Providers\LaravelServiceProvider::class,
5151
```
5252

53-
4) In the same `config/app.php` file add the following to the `aliases ` array:
53+
4. In the same `config/app.php` file add the following to the `aliases ` array:
5454

5555
``` php
5656
'Client' => Webklex\IMAP\Facades\Client::class,
5757
```
5858

59-
5) Run the command below to publish the package config file [config/imap.php](src/config/imap.php):
59+
5. Run the command below to publish the package config file [config/imap.php](src/config/imap.php):
6060

6161
``` shell
6262
php artisan vendor:publish
@@ -84,18 +84,18 @@ The following encryption methods are supported:
8484
Detailed [config/imap.php](src/config/imap.php) configuration:
8585
- `default` — by default this the imap handler will use this given account.
8686
- `accounts` — all available accounts
87-
- `default` — account identifier
88-
- `host` — imap host
89-
- `port` — imap port
90-
- `encryption` — desired encryption method
91-
- `validate_cert` — decide weather you want to verify the certificate or not
92-
- `username` — imap account username
93-
- `password` — imap account password
94-
- `options` — additional fetch options
95-
- `delimiter` — you can use any supported char such as ".", "/", etc
96-
- `fetch` — `FT_UID` (message marked as read by fetching the message) or `FT_PEEK` (fetch the message without setting the "read" flag)
97-
- `open` — special configuration for imap_open()
98-
- `DISABLE_AUTHENTICATOR` — Disable authentication properties.
87+
- `default` — account identifier
88+
- `host` — imap host
89+
- `port` — imap port
90+
- `encryption` — desired encryption method
91+
- `validate_cert` — decide weather you want to verify the certificate or not
92+
- `username` — imap account username
93+
- `password` — imap account password
94+
- `options` — additional fetch options
95+
- `delimiter` — you can use any supported char such as ".", "/", etc
96+
- `fetch` — `FT_UID` (message marked as read by fetching the message) or `FT_PEEK` (fetch the message without setting the "read" flag)
97+
- `open` — special configuration for imap_open()
98+
- `DISABLE_AUTHENTICATOR` — Disable authentication properties.
9999

100100
## Usage
101101

@@ -200,6 +200,37 @@ foreach($aMessage as $oMessage){
200200
}
201201
```
202202

203+
Available search criteria:
204+
- `ALL` — return all messages matching the rest of the criteria
205+
- `ANSWERED` — match messages with the \\ANSWERED flag set
206+
- `BCC` "string" — match messages with "string" in the Bcc: field
207+
- `BEFORE` "date" — match messages with Date: before "date"
208+
- `BODY` "string" — match messages with "string" in the body of the message
209+
- `CC` "string" — match messages with "string" in the Cc: field
210+
- `DELETED` — match deleted messages
211+
- `FLAGGED` — match messages with the \\FLAGGED (sometimes referred to as Important or Urgent) flag set
212+
- `FROM` "string" — match messages with "string" in the From: field
213+
- `KEYWORD` "string" — match messages with "string" as a keyword
214+
- `NEW` — match new messages
215+
- `OLD` — match old messages
216+
- `ON` "date" — match messages with Date: matching "date"
217+
- `RECENT` — match messages with the \\RECENT flag set
218+
- `SEEN` — match messages that have been read (the \\SEEN flag is set)
219+
- `SINCE` "date" — match messages with Date: after "date"
220+
- `SUBJECT` "string" — match messages with "string" in the Subject:
221+
- `TEXT` "string" — match messages with text "string"
222+
- `TO` "string" — match messages with "string" in the To:
223+
- `UNANSWERED` — match messages that have not been answered
224+
- `UNDELETED` — match messages that are not deleted
225+
- `UNFLAGGED` — match messages that are not flagged
226+
- `UNKEYWORD` "string" — match messages that do not have the keyword "string"
227+
- `UNSEEN` — match messages which have not been read yet
228+
229+
Further information:
230+
- http://php.net/manual/en/function.imap-search.php
231+
- https://tools.ietf.org/html/rfc1064
232+
- https://tools.ietf.org/html/rfc822
233+
203234
Paginate a message collection:
204235
``` php
205236
use Webklex\IMAP\Facades\Client;

0 commit comments

Comments
 (0)