SendEmail Activity in SharePoint 2010 Sequential Workflow

To create sequential workflow in SharePoint 2010 using Visual Studio 2010 please refer my previous blog. SendEmail activity is used to create a task in the Tasks list.
Steps Involved
  1. Go to toolbox, drag and drop the SendEmail activity from SharePoint Workflow section onto the workflow design surface (Workflow1.cs[Design]).
  2. Go to sendEmail1 properties, select the CorreleationToken as workflowToken and in theOwnerActivityName select workflow1.
  3. Next we need to set the To property, click on the …button in the To property.
  4. Click on Bind to a new member tab, select Create Field option and then click on Ok.
  5. Similarly set the Subject and Body property.
To property:
sendEmail1 properties:
Workflow1.cs:
  1. using System;  
  2. using System.ComponentModel;  
  3. using System.ComponentModel.Design;  
  4. using System.Collections;  
  5. using System.Drawing;  
  6. using System.Linq;  
  7. using System.Workflow.ComponentModel.Compiler;  
  8. using System.Workflow.ComponentModel.Serialization;  
  9. using System.Workflow.ComponentModel;  
  10. using System.Workflow.ComponentModel.Design;  
  11. using System.Workflow.Runtime;  
  12. using System.Workflow.Activities;  
  13. using System.Workflow.Activities.Rules;  
  14. using Microsoft.SharePoint;  
  15. using Microsoft.SharePoint.Workflow;  
  16. using Microsoft.SharePoint.WorkflowActions;  
  17. namespace SequentialWorkflow.Workflow1  
  18. {  
  19.     public sealed partial class Workflow1: SequentialWorkflowActivity  
  20.     {  
  21.         public Workflow1()  
  22.         {  
  23.             InitializeComponent();  
  24.         }  
  25.         public Guid workflowId =  
  26.         default (System.Guid);  
  27.         public SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties();  
  28.         private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)  
  29.         {  
  30.         }  
  31.         public String sendEmail1_To1 =  
  32.         default (System.String);  
  33.         public String sendEmail1_Subject1 =  
  34.         default (System.String);  
  35.         public String sendEmail1_Body1 =  
  36.         default (System.String);  
  37.         private void sendEmail1_MethodInvoking(object sender, EventArgs e)  
  38.   
  39.         {  
  40.             sendEmail1_To1 = “[email protected]”;  
  41.             sendEmail1_Subject1 = “Testing”;  
  42.             sendEmail1_Body1 = “Testing”;  
  43.         }  
  44.   
  45.     }  
  46.   
  47. }