php-imap-client
php-imap-client copied to clipboard
Problem with empty attachment name
There is a problem with attachments, when filename contain diacritic symbols. For example, if original filename is "zażółć gęślą jaźń.pdf", I get an empty attachment filename.
In file IncomingMessageAttachment.php in function getName() after: if (strtolower($param->attribute) === 'filename') { $this->name = $param->value; break; } I added: else{ $this->name = str_replace(array("'"," ","UTF-8"),array("","",""),(urldecode($param->value)); } Now it's works.