Using the string repalce action in SharePoint workflow designer to send mail from mail template

Recently customer want to use SharePoint send mail by mail template with place holders.

Unfortunately, there isn't out box action(activity) for replaceing the place holder.

Fortunately, we have a open source solution http://spdwfstringactions.codeplex.com/releases/view/61847 which can provide the string replace action for SharePoint desinger 2010.

Now let's go through the steps to implement the requirement for sending mail by mail template with place holders:

1. Download the SPDWorkflowStringActions.wsp from http://spdwfstringactions.codeplex.com/releases/view/61847 and store it in C:\

2. Start the "SharePoint 2010 Management Shell" as adminstrator

3. Cd to C:

4. Run command "Add-SPSolution C:\SPDWorkflowStringActions.wsp" to install the solution to the local SharePoint farm.

5. Open the center admin site of the local farm and navigate to the solution mamagement page, click the "SPDWorkflowStringActions.wsp" link:

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第1张图片

 

6. Depoly the solution by click the "Deploy Solution" link:

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第2张图片

7. Click OK for confirm page

8. After deploy successed, you can see the status of the solution should be changed to deployed:

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第3张图片

9.Create a custom list to save the mail template, named mailtemplate, add one column with rich text named template to store the content of the mail template, then add one test template:

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第4张图片

 

10. Create a workflow for tasks list, and set the start condition to creating or updating.

11. Create a variable for the workflow(used for storing mail template string):

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第5张图片

12. Add a action for setting that variable:

13. Configure the set workflow variable action:

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第6张图片

 

14. Add the string replace action to replace the place holders in the maill template

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第7张图片

15. Configure the repalce action

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第8张图片

 

 

16. Add the "send an email" action:

17. Configure the "send an mail" action:

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第9张图片

18. That is the overview of the workflow:

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第10张图片

 

19. Click publish button to publish the workflow

20. Add or update a task in the tasks list to test the send mail workflow

Using the string repalce action in SharePoint workflow designer to send mail from mail template_第11张图片

21.Check the outlook, you will find the mail which send by the workflow:

 

 

你可能感兴趣的:(String,workflow,command,action,download,SharePoint)