Skip to content

Commit

Permalink
optional config parameter added
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte Goldenbaum committed Apr 19, 2017
1 parent c9e28f1 commit 69aa58e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/IMAP/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public function setChildren($children = []) {
* Get messages.
*
* @param string $criteria
* @param null $fetch_options
*
* @return \Illuminate\Support\Collection
*/
Expand Down
2 changes: 1 addition & 1 deletion src/IMAP/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function __construct($uid, $msglist, Client $client, $fetch_options = nul
$this->uid = $uid;
$this->msglist = $msglist;
$this->client = $client;
$this->fetch_options = ($fetch_options) ? $fetch_options : FT_UID;
$this->fetch_options = ($fetch_options) ? $fetch_options : config('imap.options.fetch', FT_UID);

$this->parseHeader();
$this->parseBody();
Expand Down
12 changes: 12 additions & 0 deletions src/config/imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,16 @@
]
*/
],

/*
|--------------------------------------------------------------------------
| Available IMAP options
|--------------------------------------------------------------------------
|
| Available php imap config parameters are listed below
|
*/
'options' => [
'fetch' => FT_UID,
]
];

0 comments on commit 69aa58e

Please sign in to comment.