示例#1
0
        public async Task <IActionResult> Index()
        {
            var emailer = new Emails.Mailer();
            var str     = await emailer.SendTestEmail("*****@*****.**", "Subject line", new TestViewData
            {
                Message = "Hi from Webapp.NetCore"
            });

            return(Content(str));
        }
示例#2
0
        static async Task Main(string[] args)
        {
            var emailer = new Emails.Mailer();
            await emailer.SendTestEmail("*****@*****.**", "Subject line", new TestViewData
            {
                Message = "Hi from .net core Console"
            });

            Console.WriteLine("Done.");
            Console.WriteLine("Hit Enter...");
            Console.ReadLine();
        }