Skip to content

Commit

Permalink
getToken method added
Browse files Browse the repository at this point in the history
Generate a somewhat unique uuid to get around some uid problems
  • Loading branch information
Webklex committed Aug 24, 2020
1 parent 0baa7cb commit 1993f33
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/IMAP/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,15 @@ public function getRawBody() {
return $this->raw_body;
}

/**
* Get an almost unique message token
* @return string
* @throws Exceptions\ConnectionFailedException
*/
public function getToken(){
return base64_encode(implode('-', [$this->message_id, $this->subject, strlen($this->getRawBody())]));
}

/**
* @return string
*/
Expand Down

0 comments on commit 1993f33

Please sign in to comment.