Inheritance: 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();
        }