outlook_msg icon indicating copy to clipboard operation
outlook_msg copied to clipboard

Some email attachments fail on getting filename

Open ElliotJH opened this issue 6 years ago • 2 comments

Sometimes

@property
    def filename(self):
        return self.mfs['PidTagAttachLongFilename']

Fails because PidTagAttachLongFIlename isn't valid.

ElliotJH avatar Jun 26 '19 13:06 ElliotJH

This is when an email is attached to an email, generally on an internal forwarded emails

ElliotJH avatar Aug 08 '19 12:08 ElliotJH

@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

PierreSelim avatar Nov 04 '21 11:11 PierreSelim