Skip to content

Commit 1993f33

Browse files
committed
getToken method added
Generate a somewhat unique uuid to get around some uid problems
1 parent 0baa7cb commit 1993f33

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/IMAP/Message.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,15 @@ public function getRawBody() {
11081108
return $this->raw_body;
11091109
}
11101110

1111+
/**
1112+
* Get an almost unique message token
1113+
* @return string
1114+
* @throws Exceptions\ConnectionFailedException
1115+
*/
1116+
public function getToken(){
1117+
return base64_encode(implode('-', [$this->message_id, $this->subject, strlen($this->getRawBody())]));
1118+
}
1119+
11111120
/**
11121121
* @return string
11131122
*/

0 commit comments

Comments
 (0)