Pregunta

I am working on SharePoint server 2013. and we want to have the ability for users to send suggestions by email and get these emails saved inside a SharePoint list. now i know that each list can have an in-coming email settings, where you can basically send emails to a list. but i have these questions before start working on this:-

  1. can i map the email fields mainly the email's "From","Subject" & "Body" fields into the list fields.. by saying for example that the email "From" field should be saved inside a site column named "EmailFrom"??

  2. In addition to mapping these fields , can i save the original email as an attachment inside the list item? so when user send an email to a list the email got saved as an attachment inside the list item?

Thanks

¿Fue útil?

Solución

  1. Yes, you can grab the mail headers using an Event Handler. This will fire when an email is received.

    public override void EmailReceived(SPList list, SPEmailMessage emailMessage, String receiverData) { SPListItem newItem = list.Items.Add(); newItem["EmailFrom"] = emailMessage.Headers["From"] newItem["EmailTo"] = emailMessage.Headers["To"] // etc, etc.... newItem.Update(); }

See here: https://jasear.wordpress.com/2010/11/11/enable-incoming-emails-on-a-custom-sharepoint-list/

  1. Yes, attachments can be saved also. If they're failing, check out the following.

See here: https://technet.microsoft.com/en-us/library/cc262947.aspx#section6

Licenciado bajo: CC-BY-SA con atribución
scroll top