@@ -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
3636sudo apt-get install php* -imap && sudo apache2ctl graceful
3737```
3838
3939You 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
4444composer 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
5050Webklex\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
6262php artisan vendor:publish
@@ -84,18 +84,18 @@ The following encryption methods are supported:
8484Detailed [ config/imap.php] ( src/config/imap.php ) configuration:
8585 - ` default ` &mdash ; by default this the imap handler will use this given account.
8686 - ` accounts ` &mdash ; all available accounts
87- - ` default ` &mdash ; account identifier
88- - ` host ` &mdash ; imap host
89- - ` port ` &mdash ; imap port
90- - ` encryption ` &mdash ; desired encryption method
91- - ` validate_cert ` &mdash ; decide weather you want to verify the certificate or not
92- - ` username ` &mdash ; imap account username
93- - ` password ` &mdash ; imap account password
94- - ` options ` &mdash ; additional fetch options
95- - ` delimiter ` &mdash ; you can use any supported char such as ".", "/", etc
96- - ` fetch ` &mdash ; ` FT_UID ` (message marked as read by fetching the message) or ` FT_PEEK ` (fetch the message without setting the "read" flag)
97- - ` open ` &mdash ; special configuration for imap_open()
98- - ` DISABLE_AUTHENTICATOR ` &mdash ; Disable authentication properties.
87+ - ` default ` &mdash ; account identifier
88+ - ` host ` &mdash ; imap host
89+ - ` port ` &mdash ; imap port
90+ - ` encryption ` &mdash ; desired encryption method
91+ - ` validate_cert ` &mdash ; decide weather you want to verify the certificate or not
92+ - ` username ` &mdash ; imap account username
93+ - ` password ` &mdash ; imap account password
94+ - ` options ` &mdash ; additional fetch options
95+ - ` delimiter ` &mdash ; you can use any supported char such as ".", "/", etc
96+ - ` fetch ` &mdash ; ` FT_UID ` (message marked as read by fetching the message) or ` FT_PEEK ` (fetch the message without setting the "read" flag)
97+ - ` open ` &mdash ; special configuration for imap_open()
98+ - ` DISABLE_AUTHENTICATOR ` &mdash ; Disable authentication properties.
9999
100100## Usage
101101
@@ -200,6 +200,37 @@ foreach($aMessage as $oMessage){
200200}
201201```
202202
203+ Available search criteria:
204+ - ` ALL ` &mdash ; return all messages matching the rest of the criteria
205+ - ` ANSWERED ` &mdash ; match messages with the \\ ANSWERED flag set
206+ - ` BCC ` "string" &mdash ; match messages with "string" in the Bcc: field
207+ - ` BEFORE ` "date" &mdash ; match messages with Date: before "date"
208+ - ` BODY ` "string" &mdash ; match messages with "string" in the body of the message
209+ - ` CC ` "string" &mdash ; match messages with "string" in the Cc: field
210+ - ` DELETED ` &mdash ; match deleted messages
211+ - ` FLAGGED ` &mdash ; match messages with the \\ FLAGGED (sometimes referred to as Important or Urgent) flag set
212+ - ` FROM ` "string" &mdash ; match messages with "string" in the From: field
213+ - ` KEYWORD ` "string" &mdash ; match messages with "string" as a keyword
214+ - ` NEW ` &mdash ; match new messages
215+ - ` OLD ` &mdash ; match old messages
216+ - ` ON ` "date" &mdash ; match messages with Date: matching "date"
217+ - ` RECENT ` &mdash ; match messages with the \\ RECENT flag set
218+ - ` SEEN ` &mdash ; match messages that have been read (the \\ SEEN flag is set)
219+ - ` SINCE ` "date" &mdash ; match messages with Date: after "date"
220+ - ` SUBJECT ` "string" &mdash ; match messages with "string" in the Subject:
221+ - ` TEXT ` "string" &mdash ; match messages with text "string"
222+ - ` TO ` "string" &mdash ; match messages with "string" in the To:
223+ - ` UNANSWERED ` &mdash ; match messages that have not been answered
224+ - ` UNDELETED ` &mdash ; match messages that are not deleted
225+ - ` UNFLAGGED ` &mdash ; match messages that are not flagged
226+ - ` UNKEYWORD ` "string" &mdash ; match messages that do not have the keyword "string"
227+ - ` UNSEEN ` &mdash ; 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+
203234Paginate a message collection:
204235``` php
205236use Webklex\IMAP\Facades\Client;
0 commit comments