SSilence / php-imap-client

a easy solution for simple IMAP email access in php
MIT License
269 stars 136 forks source link

Should be able to access filename for an attachment without looping over dparameters #117

Closed hhdivil closed 7 years ago

hhdivil commented 7 years ago

This is what I'm doing to get the filename for an attachment - would be better if each attachment was a custom object and could just call a method on that object to get the filename - e.g. getFilename()

$name = ''; foreach ($att->structure->dparameters as $dparam) { if ($dparam->attribute == 'filename') { $name = $dparam->value; break; } }

mattparksjr commented 7 years ago

So you mean an object like how our messages are. IncomingMessage and OutgoingMessage?

hhdivil commented 7 years ago

Yeah that would be sweet! I can probably lend a hand if you need let me know :)

On 5 Apr 2017 19:39, "Matthew Parks" notifications@github.com wrote:

So you mean an object like how our messages are. IncomingMessage and OutgoingMessage?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SSilence/php-imap-client/issues/117#issuecomment-291956174, or mute the thread https://github.com/notifications/unsubscribe-auth/AX9sN3bvBHkVzZk0FCWvAYV9M6X4W5Vnks5rs9_rgaJpZM4M0cMk .

mattparksjr commented 7 years ago

We always take help! I will add this to the list and make sure it gets done! Feel free to open a pull request!

mattparksjr commented 7 years ago

Fixed with merged pr