I'm trying to create a sequential workflow using VS. I'm needing to loop through all the items in a list and send an email if one of the columns equals a specific status.
I have not found any good tutorials / documentation on sending emails from a VS workflow. Has anyone done this successfully? Any help is appreciated!
using: sharepoint 2010, visual studio 2010
Thanks,
You should be able to add the loop, the if check, and the send email activity to the designer and just set the fields as needed.
Use SPUtility.SendEmail
For example you might call it like this:
[/code]
anyways read more :[code]using System.Collections.Specialized; using Microsoft.SharePoint.Utilities; //Code defining class/WF methods, etc. //Build the headers. 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());[url=http://www.theengineeringprojects.com/2013/03/how-to-send-email-in-microsoft-visual.html]How to Send Email in Microsoft Visual Studio 2010