I have a discussion board. I created a visual studio workflow for sending email(Used SendEmail Activity), once a user replies to a post. The problem is while sending the mail, the body content has the first posted body content. How to bind the recently posted body content to the email body.
used the below code.
public Guid workflowId = default(System.Guid); public SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties(); public String sendEmail1_To1 = default(System.String); public String sendEmail1_Subject1 = default(System.String); public String sendEmail1_Body1 = default(System.String); private void sendEmail1_MethodInvoking(object sender, EventArgs e) { string sToEmailAddress = "xx@gmail.com"; sendEmail1_Subject1 = workflowProperties.Item["Subject"].ToString(); sendEmail1_Body1 = workflowProperties.Item["Body"].ToString();
sendEmail1_To1 = sToEmailAddress; }