This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Email and Attachment Count

Dear Forum, 

Has anyone ever experienced this problem and if yes, have you found a solution?

Here is the scenario:

  • An email (with 2 attachments) is saved into M-Files
  • We have an attachment counter which usually counts the attachments, but this time it shows zero (however there are two attachments in this email)
  • When the user double clicks on the email to open it, the email plus attachments are visible.

I am told that the problem is that the attachments can be defined differently in the msg file. There are 2 attributes (hidden, inline).

Has anyone developed a sound way to easily identify the number of attachments that are within an email. Basically the idea here is, a user shouldn't have to double click through numerous emails to find the attachment they are searching for. It would also be great to have views that display in a tabular form, the email name, whether there are attachments or not, and any other relevant data.

thanks!

Parents Reply Children
  • Specifically the "save as type" can split out most attachments.  If this isn't splitting out attachments for you in some situations then that sounds like something that should be raised with support@m-files.com.

    Regards,

    Craig.

  • Hi Craig, We are currently using the Automatically Populated metadata as you have mentioned and this is working well, however I can't see any option that enables the number of attachments to be displayed in M-files.

  • That's true.  I assume you're saving the attachments separately?  I think and I were under the impression you were perhaps doing it differently.

    I think the only way to do this would be some code.  This could perhaps be a calculated property that's added to all of your email classes, or it could be done through something more complex such as an event handler.  Either way: you'll need at least a small amount of code.

    The code doesn't have to be complex, for example.  To list the number of files on an object the code needs to just be:

    Output = Vault.ObjectOperations.GetObjectVersionAndProperties(ObjVer).VersionData.FilesCount

    (You may need a "-1" in there to deal with the ".msg" file too!).

    Regards,

    Craig.

  • Hi Craig, Attachments could be saved with and without the email. In the testing I have done so far, I have only saved an email with multiple attachments, however it was not possible to see the number of attachments within M-Files. I am not familiar with event handlers or coding, but I can definitely look into both. Many thanks for your input.