예제 #1
0
        public static void SendEmail <T>(string email, string subject, string templateName, EmailDTO <T> model)
        {
            try
            {
                SmtpClient  client = new SmtpClient();
                MailMessage mm     = new MailMessage("*****@*****.**", email)
                {
                    IsBodyHtml = true,
                    Subject    = subject,
                    Body       = RenderEmailToString(templateName, model)
                };

                client.SendAsync(mm, null);
            }
            catch
            {
            }
        }