Exemple #1
0
        private static bool PasswordRequest(string userID, string email, DatabaseAccess _access)
        {
            string token     = CryptoUtils.GetRandomBase64String(24);
            string tokenHash = CryptoUtils.Sha256Hash(token);
            string link      = String.Format(UserController.PASSWORD_LINK, HttpUtility.UrlEncode(token));
            DBCode code      = _access.AddPasswordToken(userID, tokenHash, DateTime.Now.AddDays(2));

            if (code != DBCode.OK)
            {
                return(false);
            }
            string text = $"Password form link:<br>" + link;

            MaleUtils.SendMail(email, "Submit Bar Ilan User registration", text);
            return(true);
        }
Exemple #2
0
 public static void Main(string[] args)
 {
     MaleUtils.SendMail("*****@*****.**", "hello", "<u><h3>yes</h3></u><hr><u><h3>yes</h3></u>");
     //CreateHostBuilder(args).Build().Run();
 }