Friday, June 14, 2013

Sending Attachments via SharePoint 2010 Workflow

Sending Attachments via SharePoint 2010 Workflow

We had a use case of certain users not having a laptop or home devices to access certain documentation that occasionally is sent out later in the evening or over the weekend.  It was decided that we would send attachments as part of the SharePoint workflow process, and of course SharePoint designer does not have that functionality. 
A quick search turned up the following codeplex project, by user Aozen.
http://sharepointstuff.codeplex.com/releases/view/66258

This is an amazingly simple download and install, and the product works without any issues at all.  I initially used it on a Document Library to send an individual attachment, but it also works with lists and multiple attachments (not sure if there is a limit to this, I have sent up to 5 smaller attachments, but of course your email system/SMTP on SharePoint may need to be tweaked if you want to move large files).


-------------------------------------------------

Installation Instructions (from Aozen's Codeplex link above)This solution must be deployed as a farm solution. It will not work as a sandboxed solution.

  1. Download the .wsp file from the download section
  2. Use the normal methods for adding the solution to the solution store (Stsadm or powershell)
  3. Log into central admin and deploy the solution. This adds a feature that you can activate at the web application level
  4. Go to Web application management in Central Administration. Select the web application that will use this activity. Click manage features in the ribbon. Activate the Send Email with attachment feature.
  5. Activating the feature adds a safe assembly line to the web config file.

How to use
  1. Open SharePoint Designer
  2. Navigate to the list / library you want to add a workflow to
  3. In the Actions drop down you should see a new section called SharePointStuff Custom Actions
  4. Select the Send Email With Attachment activity

Note
To send the emails the activity uses the SMTP server setup for the current web application in SharePoint. If outgoing email is not enabled on your farm you will need to enable it or you will get an exception.

10 comments:

Anonymous said...

This is a nice blog post that complements the codeplex link.

Thanks for sharing.

agorlach said...
This comment has been removed by a blog administrator.
Anonymous said...

Is there anyway I can do this without having to download anything to my computer. This is for work and if I don't have to download anything I really don't want too.
Thanks

SharePoint Collective said...

Re: Downloading

Hi, yes this is a solution that needs to be installed on the SharePoint server itself in order to unlock the feature. Instructions are in the CodePlex link for installation.

Anonymous said...

Do you know if this solution works in an SSL (https://) SharePoint 2010 environment? We were using another CodePlex solution and it does not seem to work with SP2010 and SSL.

SharePoint Collective said...

RE:SSL

Not sure about SSL and 2010.
We went to 2013 earlier this year and went with a different solution for the original business case need for this workflow. You should leave a comment on the Codeplex discussion board, as I'm sure there are more eyes watching that.
Best of luck.

ANAS AZLAN said...

Any idea what to change in web.config to enable this solution to work in sharepoint 2013?

SharePoint Collective said...

According to this link:
http://sharepointstuff.codeplex.com/discussions/573694
Aozen has created a for profit version of this for 2013. We never moved the solution to 2013 so no idea on the web.config edits.

Anonymous said...

I have downloaded the score code and still not locating where is Wsp located to deploy into sharepoint

SharePoint Collective said...

Re: Source code/WSP.
I'm not sure if the product is still even active, as this post is 5 years old for SharePoint 2010. But the wsp in the location of the .ZIP file downloaded, so perhaps unzipping the file will help. If you are still having issues you would probably be best served by posting a comment on the codeplex site:
https://archive.codeplex.com/?p=sharepointstuff