0

I have a question what is possible with regards to integrating email into SharePoint.

The Goal:

Our HR department want to try and consolidate all job applications into a SharePoint 'recruitment' portal. A requirement is that all emails that are addressed to 'recruitment@mail.com' get pulled into SP. When a mail is received, it checks to see if the email address exists to an existing Candidate object, and then associates accordingly. HR then not only want to see all mails associated to a Candidate (a Conversation History if you will), but also reply from SharePoint.

What I have done so far:

So far I have created a document library with an 'incoming' email address, and am receiving email into this list. I think with a little extra code/logic, we can then associate the recipient email address to an existing Candidate object.

The Current Problem with Current Solution:

So the 'problem' I see with this current solution, all it is doing is saving a saved email object to the library. In order to read the mail, the user needs to save the email object, and then open it externally in their Outlook application. Not really making a worthwhile improvement to their existing flow.

So my question is - How Can This Be Improved?

Has anybody seen or have experiencing in managing email more effeciently in SharePoint? I know SP is more of a 'library' and 'list' directory, and maybe this might be going out the scope of what SharePoint is designed for, but is more customizing possible?

What I suppose Im asking is, how can I extract more data from an incoming mail, and create a custom email object with it? So clicking on the mail item will show you the content of the mail, etc. Without necessarily needing to 'download' the mail object and then opening it externally.

Any solutions or advice would be greatly appreciated..! thanks :)

1

There's a lot of options here...

The "obvious" one (at least for a developper) would be to attach an ER to the incoming-email doc lib (I assume we can keep that doc lib, since it's anyway a good way to easily catch emails).

Once the email is received, our ER triggers and gets the content of the .eml file. It then needs to parse that content to understand its format (plain text, HTML...) and extract it (I'm sure we can find C# libraries to do that part of the job).

You may then store that content in a Rich Text field of the doc lib, or in another list.

  • Ah great, thanks,,, that makes a bit of sense. :) ER meaning an event receiver, correct? Going to dive into this a little tomorrow, and will update if I've made progress. But thanks for the suggestion! – Simon Apr 16 '15 at 15:20
  • Yup, sorry, ER = Event Receiver – Evariste Apr 16 '15 at 19:46
  • Hi @Evariste, thanks for your suggestion again. I have manged to setup an Event Receiver. When a new EML object is created in the 'Email Library', it triggers the ER code. Currently, I wrote some test code to retrieve the 'title' of the list object. I am going to investigate further, but do you know of how I can now read the attached .eml file of a list item? Or a library that can parse it? Thanks again for your help! – Simon Apr 20 '15 at 6:49
  • Update: I found the 'SPEmailMessage' class. I am now wondering how to assign the eml object from my 'SPListItem emailLibraryListItem' to the 'SPEmailMessage' object.. – Simon Apr 20 '15 at 8:24
  • 1
    Thanks for your help and advice Evariste. After struggling a bit with trying to go the 'SPEmailMessage' route on 'ItemAdded' ER, I managed to get what I wanted to accomplish using the 'EmailReceived' ER on a library configured for incoming mail. The link at - pholpar.wordpress.com/category/incoming-email - helped me a lot with this. Thank you! :) – Simon Apr 21 '15 at 9:24

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.