locked
email is not getting send from visual studios sequential custom work flow ApprovalCreateTask method in RRS feed

  • Question

  • hi,

    can any one suggest,

    I have created one custom visual studio sequential workflow on task list to send email notification using work flow AprrovlaCreatTask method as below.Code in looping throw fine when i checked it in debug mode.But final email is not getting sended to the respective users.I checked my smtp by creating sharepoint alerts it works fine.But from work flow email is not getting send even after code is running fine with out throwing any error.

           private void ApprovalCreateTask_MethodInvoking(object sender, EventArgs e)
            {
                this.ApprovalTaskId = Guid.NewGuid();
                this.ApprovalTaskProperties = new SPWorkflowTaskProperties();          
                SPSite spSite = new SPSite("http://server:Port");
                SPWeb spWeb = spSite.OpenWeb();
                this.ApprovalTaskProperties.AssignedTo =spuser.LoginName;             this.ApprovalTaskProperties.EmailBody = "hi";
                this.ApprovalTaskProperties.Title = "Please" + workflowProperties.Item.Name;
                this.ApprovalTaskProperties.DueDate = DateTime.Now.AddDays(5);
                this.ApprovalTaskProperties.ExtendedProperties["Status"] = "Open";
                this.ApprovalTaskProperties.SendEmailNotification = true;                                         

            }


    Thanks & Regards, Krishna


    Monday, July 1, 2013 2:22 PM