Exemplo n.º 1
0
        // Send email to change password for user
        public void ForgetPsswordEmail(PasswordForget changing)
        {
            try
            {
                EmailModel emailModel = new EmailModel();
                emailModel.toname  = "Client";
                emailModel.toemail = changing.Email;
                emailModel.subject = "No Reply: Password Reset Request! ";
                var url = changing.Link;
                emailModel.message =
                    "<div style='Text-align:center;background-color:#f9fbfd'>"
                    + "<img src='https://i.ibb.co/6g1vBwY/logo-text.png' alt='logo'/>"
                    + "<h2> Dear Client, </h2>"
                    + "<h4> You recently requested to reset your password for your account. Click the link below to reset it.</h4>"
                    + "<h4> <br/><a href=" + url + ">" + "click here" + "</a> <br/></h4>"
                    + "<h4> If you did not request a password reset, please ignore this email or reply to let us know.<br/><br/> Thank you.</h4>"
                    + "</div>";

                // Send mail to client
                try
                {
                    EmailManager emailManager = new EmailManager();
                    emailManager.SendEmail(emailModel);
                }
                catch (Exception ex)
                {
                    GlobalVariable.log.Write(LogLevel.Error, ex);
                    throw ex;
                }
            }
            catch (Exception ex)
            {
                GlobalVariable.log.Write(LogLevel.Error, ex);
                throw ex;
            }
        }