Hi y’all
I’m writing a C Extmngr which hooks EM_SMTPMESSAGEACCEPT (EM_REG_BEFORE) events to do mail filtering and I’m having a really really hard time figuring out how to change the names of file attachments. Any and all help would be oh so greatly appreciated…
What I’ve done so far:
-
Get the FILEOBJECT struct and the actual file data, reallocate the db storage to hold new contents, update the FO stuct’s FileSize and write everything back … works fine; one attachment icon (original filename), pointing to new content
-
Change the filename part of FILEOBJECT (reallocating if necessary) … New gray icon with new filename appears pointing to new content, old icon with old filename points to a zero sized file (error if I try to view/save it)
-
Change the MIME_PART that refers to the old filename to refer to the new one (change content-type and content-transfer-encoding too if necessary) … same as 2) except now both icons have the new filenames, and the original icon has a new encoding associated with it…
I’ve tried to completely dump each and every item in the note to a file, but I can’t see anything else relating to the attachments…
What am I missing?
Cheers and tia.