Beispiel #1
0
        public static void Main() {
            IEmailTemplateContentReader templateReader = new FileSystemEmailTemplateContentReader();
            IEmailTemplateEngine templateEngine = new EmailTemplateEngine(templateReader);

            IEmailSender sender = new EmailSender {
                CreateClientFactory = () => new SmtpClientWrapper(CreateSmtpClientWhichDropsInLocalFileSystem())
            };

            var subsystem = new EmailSubsystem("*****@*****.**", templateEngine, sender);

            subsystem.SendWelcomeMail("Jon Smith", "~!Agc2d#7", "*****@*****.**");

            Console.WriteLine("Mail delivered, check the outbox folder.");
            Console.Read();
        }
Beispiel #2
0
        public static void Main()
        {
            IEmailTemplateContentReader templateReader = new FileSystemEmailTemplateContentReader();
            IEmailTemplateEngine        templateEngine = new EmailTemplateEngine(templateReader);

            IEmailSender sender = new EmailSender {
                CreateClientFactory = () => new SmtpClientWrapper(CreateSmtpClientWhichDropsInLocalFileSystem())
            };

            var subsystem = new EmailSubsystem("*****@*****.**", templateEngine, sender);

            subsystem.SendWelcomeMail("Jon Smith", "~!Agc2d#7", "*****@*****.**");

            Console.WriteLine("Mail delivered, check the outbox folder.");
            Console.Read();
        }