3

We have a document library with incoming email settings enabled. I need to check if there is a way to get metadata sent along with the file to email address and show it up in the metadata columns in the document library. I am looking for custom metadata unlike created by or created date.

  • What if you define default column values for this list, does that work? Other solutions would mean custom implementing incoming mail handler or event receiver on the list. – Jussi Palo Oct 28 '16 at 7:02
  • @JussiPalo: Default values may not work for us. But we open to writing incoming email handler or event receiver. Any idea if we can send metadata in email and then read it in event receiver? – Naveen Oct 28 '16 at 7:11
  • Sending metadata in email is trivial, but parsing that in email receiver is nearly impossible unless formatting of the mail is strict - which never is the case if human is sending the email. Unless of course you're constructing metadata based on sender profile or some other data that is not related to the actual textual email that is received. – Jussi Palo Oct 28 '16 at 12:38
1

When uploading e-mail messages to SharePoint, the e-mail headers (From, To, CC, Subject, Date, etc.) can be automatically mapped to SharePoint columns.

For all header information refer this http://www.mainsoft.com/spnotes-20-doc/mappingemailheaders.

So may be your requirement cannot be achieved using OOTB feature. Since you are open to event receiver, you can attach SPEmailEventReceiver and make use of "Subject" header to fill in your metadata i.e. send the subject of the mail with information required to fill metadata separated by some pre-defined special character.

For e.g. if the subject for mail is "HR | Policy | Yes | Relocation Policy" can be read in event receiver code, split the subject by "|" and set the metadata as required :

Department - HR / 1st object of array obtained by split action Category - Policy / 2st object of array obtained by split action Confidential - Yes / 3st object of array obtained by split action Name / Title - Relocation Policy/ 4st object of array obtained by split action

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.