상속: IEmailSystem
예제 #1
0
        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();
        }
예제 #2
0
        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();
        }