예제 #1
0
        protected internal virtual void InitializePasswordResetEmail()
        {
            if (!EmailComposer.TemplateExists(PasswordResetEmailName))
            {
                string content = @"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">
<html xmlns = ""http://www.w3.org/1999/xhtml"">  
   <head>
    <meta http - equiv = ""Content-Type"" content = ""text/html; charset=UTF-8"" />       
    <title>{Title}</title>
    <meta name = ""viewport"" content = ""width=device-width, initial-scale=1.0"" />
    </head>
    <body style=""margin: 0; padding: 0;"">
     <table border=""0"" cellpadding=""15"" cellspacing=""0"" width=""100%"">
      <tr>
       <td>
        Hi {UserName},
       </td>
      </tr>
      <tr>
       <td>
        Someone recently requested a password reset for {ApplicationName}.  If this was you click the link below to reset your password.
       </td>
      </tr>
      <tr>
       <td>
        <a href=""{PasswordResetUrl}"">{PasswordResetUrl}</a>
       </td>
      </tr>
      <tr>
       <td>
        If you are unable to click on the link, copy and paste the above link into a browser address bar.
       </td>
      </tr>
      <tr>
       <td>
        If you did not request a password reset for {ApplicationName} you can disregard this email.
       </td>
      </tr>
      <tr>
       <td>
        Thanks,<br>
        The {ApplicationName} team
       </td>
      </tr>
     </table>
    </body>
</html>";
                EmailComposer.SetEmailTemplate(PasswordResetEmailName, content, true);
            }
        }