|
| 1 | +export interface RecoveryEmailProps { |
| 2 | + to: string; |
| 3 | + username: string; |
| 4 | + recoveryEmail: string; |
| 5 | + confirmationUrl: string; |
| 6 | + expiryDate: string; |
| 7 | + verificationCode: string; |
| 8 | +} |
| 9 | + |
| 10 | +export const recoveryEmailTemplatePlainText = ({ |
| 11 | + to, |
| 12 | + username, |
| 13 | + recoveryEmail, |
| 14 | + confirmationUrl, |
| 15 | + expiryDate, |
| 16 | + verificationCode |
| 17 | +}: RecoveryEmailProps) => |
| 18 | + `Hello ${username}, |
| 19 | + |
| 20 | + You have requested to link ${recoveryEmail} as your recovery email for your Uninbox account. |
| 21 | + |
| 22 | + Confirm your recovery email at ${confirmationUrl} |
| 23 | + |
| 24 | + If the button is not working, copy paste this code in your browser: |
| 25 | + ${verificationCode} |
| 26 | + |
| 27 | + This confirmation link will expire on ${expiryDate}. Make sure to confirm before the expiry date. |
| 28 | + |
| 29 | + -------------------------------------------------------------------------------- |
| 30 | + |
| 31 | + This email was intended for ${to}. If you did not request to link a recovery email, |
| 32 | + you can ignore this email. If you are concerned about your account's safety, |
| 33 | + please contact us immediately.`; |
| 34 | + |
| 35 | +export const recoveryEmailTemplate = ({ |
| 36 | + to, |
| 37 | + username, |
| 38 | + recoveryEmail, |
| 39 | + confirmationUrl, |
| 40 | + expiryDate, |
| 41 | + verificationCode |
| 42 | +}: RecoveryEmailProps) => |
| 43 | + `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 44 | + <html dir="ltr" lang="en"> |
| 45 | + <head> |
| 46 | + <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> |
| 47 | + </head> |
| 48 | + <div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0">Confirm your recovery email for Uninbox<div> </div> |
| 49 | + </div> |
| 50 | + <body style="margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;background-color:rgb(255,255,255);padding-left:0.5rem;padding-right:0.5rem;font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji""> |
| 51 | + <table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="max-width:465px;margin-left:auto;margin-right:auto;margin-top:40px;margin-bottom:40px;border-radius:0.25rem;border-width:1px;border-style:solid;border-color:rgb(234,234,234);padding:20px"> |
| 52 | + <tbody> |
| 53 | + <tr style="width:100%"> |
| 54 | + <td> |
| 55 | + <table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin-top:32px"> |
| 56 | + <tbody> |
| 57 | + <tr> |
| 58 | + <td><img alt="Uninbox" height="100" src="https://avatars.githubusercontent.com/u/135225712?s=400&u=72ad315d63b0326e5bb34377c3f59389373edc9a&v=4" style="display:block;outline:none;border:none;text-decoration:none;margin-left:auto;margin-right:auto;margin-top:0px;margin-bottom:0px;border-radius:0.375rem" width="100" /></td> |
| 59 | + </tr> |
| 60 | + </tbody> |
| 61 | + </table> |
| 62 | + <p style="font-size:14px;line-height:12px;margin:16px 0;margin-top:2.5rem;color:rgb(0,0,0)">Hello <strong>${username}</strong>,</p> |
| 63 | + <p style="font-size:14px;line-height:12px;margin:16px 0;color:rgb(0,0,0)">You have requested to link <strong>${recoveryEmail}</strong> as your recovery email for your Uninbox account.</p> |
| 64 | + <table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin-bottom:32px;margin-top:32px;text-align:center"> |
| 65 | + <tbody> |
| 66 | + <tr> |
| 67 | + <td><a href="${confirmationUrl}" style="line-height:100%;text-decoration:none;display:inline-block;max-width:100%;border-radius:0.25rem;background-color:rgb(0,0,0);padding-left:1.25rem;padding-right:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem;text-align:center;font-size:12px;font-weight:600;color:rgb(255,255,255);text-decoration-line:none;padding:12px 20px 12px 20px" target="_blank"><span><!--[if mso]><i style="letter-spacing: 20px;mso-font-width:-100%;mso-text-raise:18" hidden> </i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:9px">Confirm Recovery Email</span><span><!--[if mso]><i style="letter-spacing: 20px;mso-font-width:-100%" hidden> </i><![endif]--></span></a></td> |
| 68 | + </tr> |
| 69 | + </tbody> |
| 70 | + </table> |
| 71 | + <p style="font-size:14px;line-height:24px;margin:16px 0;color:rgb(0,0,0)">If the button is not working, copy paste this code in your browser:</p> |
| 72 | + <div style="background-color:#f0f0f0;border-radius:4px;padding:10px;margin-bottom:20px;"> |
| 73 | + <code style="word-break:break-all;display:block;font-family:monospace;font-size:12px;color:#333;">${verificationCode}</code> |
| 74 | + </div> |
| 75 | + <table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"> |
| 76 | + <tbody> |
| 77 | + <tr> |
| 78 | + <td> |
| 79 | + <p style="font-size:14px;line-height:20px;margin:16px 0;color:rgb(0,0,0)">This confirmation link will expire on <strong>${expiryDate}</strong>. Make sure to confirm before the expiry date.</p> |
| 80 | + </td> |
| 81 | + </tr> |
| 82 | + </tbody> |
| 83 | + </table> |
| 84 | + <hr style="width:100%;border:none;border-top:1px solid #eaeaea;margin-left:0px;margin-right:0px;margin-top:26px;margin-bottom:26px;border-width:1px;border-style:solid;border-color:rgb(234,234,234)" /> |
| 85 | + <p style="font-size:12px;line-height:24px;margin:16px 0;color:rgb(102,102,102)">This email was intended for<!-- --> <span style="color:rgb(0,0,0)">${to}</span>. If you did not request to link a recovery email, you can ignore this email. If you are concerned about your account's safety, please contact us immediately.</p> |
| 86 | + </td> |
| 87 | + </tr> |
| 88 | + </tbody> |
| 89 | + </table> |
| 90 | + </body> |
| 91 | + </html> |
| 92 | +`; |
0 commit comments