Visual Studio工作流程电子邮件 [英] visual studio workflow email

查看:108
本文介绍了Visual Studio工作流程电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现成的共享点系统,它是在Visual Studio中制作的工作流.它由以下内容组成:用户将订购某项商品,然后将其发送给主管以批准或拒绝,然后将其发送给主管以批准或拒绝.

I have a ready sharepoint system that it's workflow made in visual studio. It's consist of The user will order something, then it will reach to the director to approve that or reject it, then it will reach to the director to approve it or reject it also.

他们希望系统末端的我将电子邮件发送给发起人(订购某项商品的第一位用户),并且该电子邮件中包含该订单的副本.

They want me at the end of the system to send email to initiator (first user that order something) and this email contains copy of the order.

我如何在Visual Studio中做到这一点?

How can I do it in the visual studio?

推荐答案

您可以使用 SPUtility.SendEmail

you can achieve this by using SPUtility.SendEmailhttp://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.sendemail.aspx

Check above link for more help, the code will be like below:

            StringDictionary headers = new StringDictionary(); 
            headers.Add("content-type", "text/html");
            headers.Add("subject", "subject");
            headers.Add("from", "from@domain.com");
            headers.Add("to", "someaddress@domain.com");
            SPUtility.SendEmail(item.ParentList.ParentWeb, headers, body.ToString());


这篇关于Visual Studio工作流程电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆