Skip to content

Commit

Permalink
[fixed] RFC2231 Parameter value continuations is now supported.
Browse files Browse the repository at this point in the history
These take place for a long attachment filenames.
See http://tools.ietf.org/html/rfc2231#section-3
  • Loading branch information
troggy committed Jul 25, 2013
1 parent c3d1975 commit 4dc418f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ImapMailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,12 @@ protected function initMailPart(IncomingMail $mail, $partStructure, $partNum) {
}
if(!empty($partStructure->dparameters)) {
foreach($partStructure->dparameters as $param) {
$params[strtolower($param->attribute)] = $param->value;
$paramParts = preg_split('/\*/', strtolower($param->attribute));
$paramName = $paramParts[0];
$params[$paramName] .= $param->value;
}
}

if(!empty($params['charset'])) {
$data = iconv($params['charset'], $this->serverEncoding, $data);
}
Expand Down

0 comments on commit 4dc418f

Please sign in to comment.