outlook_msg
outlook_msg copied to clipboard
Some email attachments fail on getting filename
Sometimes
@property
def filename(self):
return self.mfs['PidTagAttachLongFilename']
Fails because PidTagAttachLongFIlename isn't valid.
This is when an email is attached to an email, generally on an internal forwarded emails
@ElliotJH encounter the same problem, not sure where the filename of the attachment is store for this, the MAPI reference is quite a mess to be honnest :)
I believe we need to read it from the subject of the attached email:
- Read the attachment
- Open it as a new msg
- Retrieve the subject from the msg and add '.msg' to the attached file for it's filename