I am using visual studio 2010(sequential sharepoint work flow) and trying to send an email activity automatically when the approval is rejected. I have added the "send email" activity in the workflow design. Can some body please tell me what has to be added to code. I would appreciate a detailed explanation as I am doing this for the first time. The workflow will be added to sharepoint.
migrated from stackoverflow.com Nov 11 '11 at 12:55
Make sure you don't run into this issue: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/73927fb1-2754-4bc2-9695-7dda77de576c/
And use the following as reference: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflowactions.sendemail_methods(v=office.12).aspx
When using the Send Email Activity you can set the subject, body, sendto etc.. in the property window or by settings this in code.
A good start building workflows in SharePointyou can read Workflow Technical Articles for SharePoint 2010 or step by stem tutorial creating workflows for SharePoint