现在的位置: 首页 > 综合 > 正文

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

2013年10月21日 ⁄ 综合 ⁄ 共 1703字 ⁄ 字号 评论关闭

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:

 

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

7. Click OK for confirm page

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

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:

 

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):

12. Add a action for setting that variable:

13. Configure the set workflow variable action:

 

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

15. Configure the repalce action

 

 

16. Add the "send an email" action:

17. Configure the "send an mail" action:

18. That is the overview of the workflow:

 

19. Click publish button to publish the workflow

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

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

 

 

抱歉!评论已关闭.