Skip to content

Commit

Permalink
Issue #253: Added charset property to IncomingMailAttachment
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Krätzig committed May 9, 2019
1 parent 7b97879 commit 93b0df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/PhpImap/IncomingMailAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class IncomingMailAttachment {
public $contentId;
public $name;
public $disposition;
public $charset;
private $file_path;
private $dataInfo;

Expand Down
1 change: 1 addition & 0 deletions src/PhpImap/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ protected function initMailPart(IncomingMail $mail, $partStructure, $partNum, $m
$attachment->contentId = $partStructure->ifid ? trim($partStructure->id, " <>") : null;
$attachment->name = $fileName;
$attachment->disposition = (isset($partStructure->disposition) ? $partStructure->disposition : null);
$attachment->charset = (isset($params['charset']) AND !empty($params['charset'])) ? $params['charset'] : null;
if($this->attachmentsDir) {
$replace = [
'/\s/' => '_',
Expand Down

0 comments on commit 93b0df1

Please sign in to comment.