public InsertDataController(UserManager <ApplicationUser> user, IGenericBL <Devices> device, IGenericBL <Logs> log, ClientKeyManager clientKey) { _user = user; _log = log; _device = device; _clientKey = clientKey; }
public EditBuilder(IGenericBL <email> emails, IGenericBL <Devices> device) { _emails = emails; _device = device; }
public DeleteController(UserManager <ApplicationUser> user, IGenericBL <Devices> device, IGenericBL <Logs> log) { _user = user; _log = log; _device = device; }
public async static Task <string> SendEmail(string subject, string msg, string toemail, IGenericBL <email> email) { var e = email.AsQueryable().FirstOrDefault(); if (e != null) { MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient(e.smtpserver); mail.From = new MailAddress(e.emailaddress); mail.To.Add(toemail); mail.Subject = subject; mail.Body = msg; SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net.NetworkCredential(e.emailaddress, e.password); SmtpServer.EnableSsl = true; ServicePointManager.ServerCertificateValidationCallback = delegate(object es, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return(true); }; try { await SmtpServer.SendMailAsync(mail); return("Ok"); } catch (Exception ex) { return(ex.Message); } } return("Email No Configured"); }
public BlHelper(IGenericBL <otp> otps, IGenericBL <email> email) { _otps = otps; _email = email; }
public ClientKeyManager(IGenericBL <KeyMaintainer> key) { _key = key; }