aspineux / pyzmail

Pyzmail is a high level mail library for Python, providing functions to read, compose and send emails
60 stars 31 forks source link

File name for message/rfc822 parts is always message.eml #2

Closed petardimitrijevic closed 9 years ago

petardimitrijevic commented 10 years ago

Hi,

I've noticed a problem with the names of the files from message/rfc822 parts. Instead of getting the file name from the mail part you are fixing it to message.eml.

The bug is on line 465 in parse.py.

Instead of: filename='message.eml' it should be: filename=get_filename(part)

Cheers, Petar

aspineux commented 10 years ago

You are right, something like this looks better

filename=get_filename(part) filename=filename if filename else 'message.eml'

I'll try to fix that quickly Thanks for reporting. Alain

petardimitrijevic commented 10 years ago

That looks perfect.

Thank you for the wonderful library.

Petar

aspineux commented 9 years ago

I have pushed the fix I will be available in next 1.0.4