Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/Fetch/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,22 @@ public function getSubject()
{
return isset($this->subject) ? $this->subject : null;
}

/**
* Decode a header
*
* @return string
*/
public function decodeHeader($header)
{
$array = imap_mime_header_decode($header);
$str = '';
foreach ( $array as $part ) {
$str .= $part->text;
}

return $str;
}

/**
* This function marks a message for deletion. It is important to note that the message will not be deleted form the
Expand Down