예제 #1
0
        public void SendEmail(EmailModel model)
        {
            var body    = GenerateHtmlTemplate(model);
            var message = new MailMessage
            {
                To         = { model.Address },
                From       = new MailAddress("*****@*****.**", "NZBDash StartAlert"),
                IsBodyHtml = true,
                Body       = body,
                Subject    = $"NZBDash Monitor {model.BreachType} Alert!"
            };
            var creds = new NetworkCredential(model.Username, model.Password);

            Client.Send(model.Host, model.Port, message, creds);
            Logger.Info(model.DumpJson().ToString());
        }