Esempio n. 1
0
        public bool SendResetPasswordEmail(string userCode, string fullName, string sex, string password, string emailAddress)
        {
            MailUtils mailUtil = new MailUtils();
            mailUtil.SetBodyHtml();
            string subject = "New Password";

            StringBuilder body = new StringBuilder("<P> Dear ");
            if (sex.Equals(Constants.Sex.Male))
            {
                body.Append("Mr. ");
            }
            else
            {
                body.Append("Ms. ");
            }
            body.Append(fullName);
            body.Append("<BR /><BR />");
            body.Append("Your new password:"******"<BR /><BR />");
            body.Append("---------------------------<BR />");
            body.Append("Username: "******"<BR />");
            body.Append("Username: "******"Thank you for using system.<BR />");
            body.Append("<BR />");
            body.Append("<BR />");
            body.Append("<BR />");
            body.Append("Best wishes,<BR />");
            body.Append("<BR />");
            body.Append("PsModel Customer Care<BR /><P>");

            return mailUtil.SendMailMessage(emailAddress, null, null, subject, body.ToString());
        }
Esempio n. 2
0
        public bool SendConfirmEmail(string userCode, string fullName, string sex, string emaiConfirmKey, string emailAddress)
        {
            MailUtils mailUtil = new MailUtils();
            mailUtil.SetBodyHtml();
            string subject = "Welcome to the PsModel website";

            StringBuilder body = new StringBuilder("<P> Dear ");
            if (sex.Equals(Constants.Sex.Male))
            {
                body.Append("Mr. ");
            }
            else
            {
                body.Append("Ms. ");
            }
            body.Append(fullName);
            body.Append("<BR /><BR />");
            body.Append("Please keep this e-mail for your records. Your account information is as follows:");
            body.Append("<BR /><BR />");
            body.Append("---------------------------<BR />");
            body.Append("Username: "******"<BR />");
            body.Append("Board URL: <A href='http://www.psmodel.vn'>http://www.psmodel.vn</A><BR />");
            body.Append("----------------------------<BR />");
            body.Append("<BR />");
            body.Append("Please visit the following link in order to activate your account:<BR />");
            body.Append("<BR />");
            string confirmUrl = "http://www.psmodel.vn/User/Active?u=" + userCode + "&k=" + emaiConfirmKey;
            body.Append("<A href='").Append(confirmUrl).Append("'>").Append(confirmUrl).Append("</A>");
            body.Append("<BR /><BR />");
            body.Append("Your password has been securely stored in our database and cannot be<BR />");
            body.Append("retrieved. In the event that it is forgotten, you will be able to reset it<BR />");
            body.Append("using the email address associated with your account.<BR />");
            body.Append("<BR />");
            body.Append("Thank you for registering.<BR />");
            body.Append("<BR />");
            body.Append("<BR />");
            body.Append("<BR />");
            body.Append("Best wishes,<BR />");
            body.Append("<BR />");
            body.Append("PsModel Customer Care<BR /><P>");

            return mailUtil.SendMailMessage(emailAddress, null, null, subject, body.ToString());
        }