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:

 

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:

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值