Skip to content

Commit 6e9215a

Browse files
author
Malte Goldenbaum
committed
FT_UID changed to $this->options which references to imap.options.fetch
1 parent 7af28d2 commit 6e9215a

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ 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-
-NaN-
8+
### Added
9+
-FT_UID changed to $this->options which references to `imap.options.fetch`
910

1011
### Affected Classes
11-
-NaN-
12+
\Webklex\IMAP\Message
1213

1314
## [1.0.3.1] - 2017-09-05
1415
### 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)