public void SendRecoveryEmail(string userEmail, int recoveryCode) { if (userEmail != null) { MailF.SendEmail(userEmail, "Recovery password", "Recovery code=" + recoveryCode); } }
public Worker(ref Database callDB, ref LogProgram logprogram) { this.database = callDB; this.logger = logprogram; this.mail = new MailF(database, logger); this.tasker = new TaskManager(logger); this.loaderFile = new LoaderFile(ref database, ref logger); this.excelModule = new ExcelModule(ref database, ref logger, ref loaderFile); tasker.EmailMonitoring(this); }
public void SendConfirmEmail(string userEmail, string userHash) { if (userEmail != null) { if (userHash != null) { MailF.SendEmail(userEmail, "Confirm account", "Confirm account: <a href=http://devinstasoft.yobidev.com/mailLink/" + userHash + ">Confirm url!</a>"); } } }
public Authentication(Context context, Validator validator) { this.context = context; this.validator = validator; mail = new MailF(); Config config = new Config(); IP = config.IP; PORT = config.Port; log = new LoggerConfiguration() .WriteTo.File("./logs/log", rollingInterval: RollingInterval.Day) .CreateLogger(); }
public void RecoveryPassword(ref HttpRequest request) { string admin_email = request.FormField("admin_email"); AdminCache admin = new AdminCache(); if (Database.admin.SelectAdmin(ref admin_email, ref admin)) { admin.recovery_code = Validator.random.Next(100000, 999999); MailF.SendEmail(admin.admin_email, "Recovery password", "Recovery code=" + admin.recovery_code); Database.admin.UpdateRecoveryCode(admin.admin_id, admin.recovery_code); request.ResponseJsonAnswer(true, "Recovery password. Send message with code to email=" + admin.admin_email); Logger.WriteLog("Recovery password, admin_id=" + admin.admin_id, LogLevel.Usual); } else { request.ResponseJsonAnswer(false, "No admin with that email."); Logger.WriteLog("No admin with that email.", LogLevel.Error); } }