public static void Main() { IEmailTemplateContentReader templateReader = new FileSystemEmailTemplateContentReader(); IEmailTemplateEngine templateEngine = new EmailTemplateEngine(templateReader); IEmailSender sender = new EmailSender { CreateClientFactory = () => new SmtpClientWrapper(CreateSmtpClientWhichDropsInLocalFileSystem()) }; EmailSubsystem subsystem = new EmailSubsystem("*****@*****.**", templateEngine, sender); subsystem.SendWelcomeMail("Jon Smith", "~!Agc2d#7", "*****@*****.**", new List <string> (new string[] { "Felipe", "Felipe1", "Felipe2" })); Console.WriteLine("Mail delivered, check the outbox folder."); Console.Read(); }
public static void Main() { IEmailTemplateContentReader templateReader = new FileSystemEmailTemplateContentReader(); IEmailTemplateEngine templateEngine = new EmailTemplateEngine(templateReader); IEmailSender sender = new EmailSender { CreateClientFactory = () => new SmtpClientWrapper(CreateSmtpClientWhichDropsInLocalFileSystem()) }; EmailSubsystem subsystem = new EmailSubsystem("*****@*****.**", templateEngine, sender); subsystem.SendWelcomeMail("Jon Smith", "~!Agc2d#7", "*****@*****.**", new List<string> (new string[] {"Felipe","Felipe1","Felipe2"})); Console.WriteLine("Mail delivered, check the outbox folder."); Console.Read(); }