# Verification code email: free HTML template | MailCraft Studio

> Shows the code in a dashed, widely spaced, copyable box, along with the device and location the request came from.

Source: https://mailcraftstudio.com/en/templates/verification-code

# Verification code email

Shows the code in a dashed, widely spaced, copyable box, along with the device and location the request came from.

Use for: Email verification, two-step login, passwordless sign-in

 

## Compatibility

Compatibility check: 0 errors, 0 warnings, 0 info notes.

## Variables

Replace these placeholders with your own values when sending.

-   `{code}`
-   `{minutes}`
-   `{request.device}`
-   `{request.location}`
-   `{app.name}`

## Backend code

```
$@"<!DOCTYPE html>
<html lang=""en"" xmlns:v=""urn:schemas-microsoft-com:vml"" xmlns:o=""urn:schemas-microsoft-com:office:office"">
  <head>
    <meta charset=""utf-8"">
    <meta name=""viewport"" content=""width=device-width, initial-scale=1"">
    <meta name=""color-scheme"" content=""light dark"">
    <meta name=""supported-color-schemes"" content=""light dark"">
    <title>
      Your {app.name} code: {code}
    </title>
    <!--[if mso]>
    <xml>
      <o:OfficeDocumentSettings>
        <o:PixelsPerInch>
          96
        </o:PixelsPerInch>
      </o:OfficeDocumentSettings>
    </xml>
    <![endif]-->
    <style>
:root  {
  color-scheme: light dark;
  supported-color-schemes: light dark;
}
 a  {
  color: #0f766e;
}
 @media (max-width: 620px)  {
  .px  {
  padding-left: 22px !important;
  padding-right: 22px !important;
}
 .col  {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}
 .h1  {
  font-size: 28px !important;
  line-height: 34px !important;
}
 .hide-sm  {
  display: none !important;
}

}
 @media (prefers-color-scheme: dark)  {
  .page  {
  background: #0c111b !important;
}
 .card  {
  background: #151b27 !important;
}
 .ink  {
  color: #edf1f7 !important;
}
 .muted  {
  color: #a8b2c3 !important;
}
 .line  {
  border-color: #2a3243 !important;
}
 .soft  {
  background: #1c2333 !important;
}

}
</style>
  </head>
  <body class=""page"" style=""margin:0;padding:0;background:#eef4f3;"">
    <div style=""display:none;max-height:0;overflow:hidden;mso-hide:all;"">
      Your code is {code}. Valid for {minutes} minutes.&#8199;&#847;&#8199;&#847;&#8199;&#847;&#8199;&#847;&#8199;&#847;
    </div>
    <table role=""presentation"" width=""100%"" cellpadding=""0"" cellspacing=""0"" class=""page"" style=""background:#eef4f3;"">
      <tr>
        <td align=""center"" style=""padding:32px 12px;"">
          <!--[if mso]>
          <table role=""presentation"" width=""600"" cellpadding=""0"" cellspacing=""0"">
            <tr>
              <td>
                <![endif]-->
                <table role=""presentation"" width=""100%"" cellpadding=""0"" cellspacing=""0"" style=""max-width:600px;"">
                  <tr>
                    <td class=""px"" style=""padding:0 8px 18px;"">
                      <table role=""presentation"" cellpadding=""0"" cellspacing=""0"">
                        <tr>
                          <td width=""28"" height=""28"" style=""width:28px;height:28px;background:#0f766e;border-radius:8px;font-size:0;line-height:0;"">
                            &nbsp;
                          </td>
                          <td class=""ink"" style=""padding-left:10px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:16px;font-weight:bold;letter-spacing:-0.2px;color:#131a2a;"">
                            {app.name}
                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                  <tr>
                    <td class=""card"" style=""background:#ffffff;border-radius:18px;"">
                      <table role=""presentation"" width=""100%"" cellpadding=""0"" cellspacing=""0"">
                        <tr>
                          <td class=""px"" style=""padding:36px 44px 12px;"">
                            <h1 class=""h1 ink"" style=""margin:0 0 14px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:32px;line-height:38px;font-weight:bold;letter-spacing:-0.6px;color:#131a2a;"">
                              Here's your code
                            </h1>
                            <p class=""muted"" style=""margin:0 0 18px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:16px;line-height:25px;color:#4d586b;"">
                              Enter this code on the sign-in screen. It expires if it isn't used within {minutes} minutes.
                            </p>
                            <table role=""presentation"" width=""100%"" cellpadding=""0"" cellspacing=""0"" style=""margin:6px 0 24px;"">
                              <tr>
                                <td align=""center"" class=""soft"" style=""padding:26px 12px;background:#e7f5f2;border:2px dashed #0f766e;border-radius:14px;font-family:'Courier New',Courier,monospace;font-size:40px;line-height:44px;font-weight:bold;letter-spacing:14px;color:#131a2a;"">
                                  <span class=""ink"">
                                    {code}
                                  </span>
                                </td>
                              </tr>
                            </table>
                            <table role=""presentation"" width=""100%"" cellpadding=""0"" cellspacing=""0"" style=""margin:0 0 22px;"">
                              <tr>
                                <td class=""muted line"" style=""padding:12px 0;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;color:#7a8597;border-top:1px solid #e4e8ef;border-bottom:1px solid #e4e8ef;"">
                                  Requested from
                                </td>
                                <td align=""right"" class=""ink line"" style=""padding:12px 0;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;color:#131a2a;border-top:1px solid #e4e8ef;border-bottom:1px solid #e4e8ef;"">
                                  {request.device} &middot; {request.location}
                                </td>
                              </tr>
                            </table>
                            <p class=""muted"" style=""margin:0 0 18px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:16px;line-height:25px;color:#4d586b;"">
                              If this wasn't you, don't share the code and ignore this email; nothing on your account changes.
                            </p>
                          </td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                  <tr>
                    <td class=""px muted"" style=""padding:22px 44px 0;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:12px;line-height:19px;color:#7a8597;"">
                      {app.name} sent this email automatically after a sign-in request.
                    </td>
                  </tr>
                </table>
                <!--[if mso]>
              </td>
            </tr>
          </table>
          <![endif]-->
        </td>
      </tr>
    </table>
  </body>
</html>"
```
