Skip to content

Commit 69aa58e

Browse files
author
Malte Goldenbaum
committed
optional config parameter added
1 parent c9e28f1 commit 69aa58e

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/IMAP/Folder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public function setChildren($children = []) {
140140
* Get messages.
141141
*
142142
* @param string $criteria
143+
* @param null $fetch_options
143144
*
144145
* @return \Illuminate\Support\Collection
145146
*/

src/IMAP/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function __construct($uid, $msglist, Client $client, $fetch_options = nul
131131
$this->uid = $uid;
132132
$this->msglist = $msglist;
133133
$this->client = $client;
134-
$this->fetch_options = ($fetch_options) ? $fetch_options : FT_UID;
134+
$this->fetch_options = ($fetch_options) ? $fetch_options : config('imap.options.fetch', FT_UID);
135135

136136
$this->parseHeader();
137137
$this->parseBody();

src/config/imap.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,16 @@
6262
]
6363
*/
6464
],
65+
66+
/*
67+
|--------------------------------------------------------------------------
68+
| Available IMAP options
69+
|--------------------------------------------------------------------------
70+
|
71+
| Available php imap config parameters are listed below
72+
|
73+
*/
74+
'options' => [
75+
'fetch' => FT_UID,
76+
]
6577
];

0 commit comments

Comments
 (0)