In this task we are going to create an activity that can send an e-mail message to a target user.
Create the SendEmail activity:
Add a new code file to the
ActivityLibrary
project namedSendEmail.cs
. Then, replace all code that is created by default with the following code:using System.Activities; public sealed class SendEmailActivity : CodeActivity { public InArgument<string> from { get; set; } public InArgument<string> host { get; set; } public InArgument<string> userName { get; set; } public InArgument<string> password { get; set; } public InArgument<string> to { get; set; } public InArgument<string> subject { get; set; } public InArgument<string> body { get; set; } public OutArgument<string> result { get; set; } protected override void Execute(CodeActivityContext context) { var mailMessage = new System.Net.Mail.MailMessage(); mailMessage.To...