Closed filipefreitas82 closed 6 years ago
Are you sure it is being decoded correctly?
How can I be sure?
Make sure the var dump name is equal to that of when it was sent
Modify the IncomingMessageAttachment.php file. I converted the name of the attribute associated with the name of the attachment in lowercase since at times it can be written all in uppercase.
/**
* Returns the name of the attachment along with file extension.
*
* @return string
*/
protected function getName()
{
// Check for different types of inline attachments.
if ($this->_incomingObject->structure->ifdparameters) {
foreach ($this->_incomingObject->structure->dparameters as $param) {
if (strtolower($param->attribute) === 'filename') { //FG I converted the name of the attribute associated with the name of the attachment in lowercase since at times it can be written all in uppercase
$this->name = $param->value;
break;
}
}
} elseif ($this->_incomingObject->structure->ifparameters) {
foreach ($this->_incomingObject->structure->parameters as $param) {
if (strtolower($param->attribute) === 'name') { //FG I converted the name of the attribute associated with the name of the attachment in lowercase since at times it can be written all in uppercase
$this->name = $param->value;
break;
}
}
}
}
Hey! What were you trying to do? If you want to submit improvements please use githubs pull request feature!
Hi! I have changed some code. Also in your example I see the name was properly kept. Please pull the latest code and let me know.
No comment for extended time. We assume this issue has been fixed.
Bug
Should return the attachment name instead of NULL.
Debug Attached an email with the following file:
This is the info part of the attachment object: