Skip to content

Commit b706aef

Browse files
authored
Merge branch 'master' into patch-1
2 parents 709b82a + 6e9215a commit b706aef

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ All notable changes to `webklex/laravel-imap` will be documented in this file.
55
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
66

77
## [UNRELEASED]
8-
98
### Fixed
109
- Fix implode error in Client.php, beacause imap_errors() can return FALSE instand of array
1110

11+
### Added
12+
-FT_UID changed to $this->options which references to `imap.options.fetch`
13+
1214
### Affected Classes
13-
-NaN-
15+
\Webklex\IMAP\Message
1416

1517
## [1.0.3.1] - 2017-09-05
1618
### Added

src/IMAP/Message.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ class Message {
9797
* @const integer ENC_BASE64
9898
* @const integer ENC_QUOTED_PRINTABLE
9999
* @const integer ENC_OTHER
100-
*
101-
* @const integer FT_UID
102100
*/
103101
const TYPE_TEXT = 0;
104102
const TYPE_MULTIPART = 1;
@@ -117,8 +115,6 @@ class Message {
117115
const ENC_QUOTED_PRINTABLE = 4;
118116
const ENC_OTHER = 5;
119117

120-
const FT_UID = 1;
121-
122118
/**
123119
* Message constructor.
124120
*
@@ -222,7 +218,7 @@ public function getHTMLBody($replaceImages = false) {
222218
* @return void
223219
*/
224220
private function parseHeader() {
225-
$header = imap_fetchheader($this->client->connection, $this->uid, FT_UID);
221+
$header = imap_fetchheader($this->client->connection, $this->uid, $this->fetch_options);
226222
if ($header) {
227223
$header = imap_rfc822_parse_headers($header);
228224
}
@@ -302,7 +298,7 @@ private function parseAddresses($list) {
302298
* @return void
303299
*/
304300
private function parseBody() {
305-
$structure = imap_fetchstructure($this->client->connection, $this->uid, FT_UID);
301+
$structure = imap_fetchstructure($this->client->connection, $this->uid, $this->fetch_options);
306302

307303
$this->fetchStructure($structure);
308304
}
@@ -546,7 +542,7 @@ public function moveToFolder($mailbox = 'INBOX'){
546542
* @return bool
547543
*/
548544
public function delete(){
549-
$status = imap_delete($this->client->connection, $this->uid, self::FT_UID);
545+
$status = imap_delete($this->client->connection, $this->uid, $this->fetch_options);
550546
$this->client->expunge();
551547

552548
return $status;

0 commit comments

Comments
 (0)