Thursday, October 28, 2010

SharePoint 2010 Email Enabled Document Library

I have been working with SharePoint for nine years and love it. Amazingly, I finally had a reason to use the SharePoint e-mailed enabled library, which I have wanted to learn since 2007.

So here’s the scenario. We use a SaaS timesheet application to record time for our employees. We wanted to import that daily report into SharePoint and display the data in a page along with other daily metrics. This report could be sent in Excel, HTML and CSV format. I also decided to use SSIS to import the data into SQL to populate a Performance Point Dashboard. Easy right?
Well, the SaaS application is only able to email reports to us and have no future plans to provide web services to query the data. Oh well. So we setup the reports to be emailed to ourselves and scheduled delivery as daily. Now, since our email server is 2003 SBS Exchange, there was little that could be done to re-reroute the emails.

After a number of searches on Google I found Jeff Widmer’s Blog with a part of the solution: http://weblogs.asp.net/jeffwids/archive/2010/08/16/configuring-incoming-email-for-sharepoint-2010-foundations.aspx . However I only wanted to use an internal account and did not want to expose the STMP server to the web.

So, here’s how we handled it.

1 – Setup the SharePoint SMTP
Login to Central Administration for either Foundation or SharePoint 2010 portal. Choose System Settings > Configure Incoming Email.


Now since I had already setup the outgoing email settings to use the SMTP server on my SharePoint server, I decided to use that for the incoming email as well. For more information on setting up the outgoing SharePoint E-mail click here, http://technet.microsoft.com/en-us/library/cc263462.aspx.

Be sure and remember the Domain Name you used to setup the SharePoint SMTP server because you will need this when you setup the Incoming E-mail settings.






Clicking on the Configure Incoming E-mail link will display this page. -->

Use the SharePoint server name + domain name + .local (ie. SharePoint.Company.local). Put that in the Incoming Email Address field.

You will also want to select Yes for Enable Sites on this server to retrieve email?

2- Setup the Document Library
Now, find the document library you want to email your attachments to and under Library Settings, click Incoming e-mail settings under Communications.


Click “Yes” under Allow this document library to receive e-mail? Under E-mail Address field add the address you want to use for this library.

Since I want this to update daily, I chose: Save all attachments in root folder and Overwrite files with same name to “Yes”.






3 –Test the Library
To test this out, open your email client and send a message with an attachment.

After a few secs, the email attachment is now in the document library:

So, I will add the SSIS import in my next post. Happy Coding!