import React from 'react'; import { EmailTemplate } from '../types'; interface ResetPasswordEmailData { name?: string; email: string; resetLink: string; expiresIn?: string; ipAddress?: string; userAgent?: string; } export const ResetPasswordEmailTemplate: EmailTemplate = { id: 'reset-password', name: 'Password Reset Email', subject: 'Reset your password', preview: 'Reset your password for your account', body: { html: (data) => ` Reset Password

Password Reset Request

Hi${data.name ? ` ${data.name}` : ''},

We received a request to reset the password for your account associated with ${data.email}.

Click the button below to reset your password:

Reset Password

Or copy and paste this link into your browser:

${data.resetLink}

🔒 Security Notice: This link will expire ${data.expiresIn || 'in 1 hour'} for your security. If you need to reset your password after this time, please request a new reset link.
${data.ipAddress || data.userAgent ? `
Request Details:
${data.ipAddress ? `IP Address: ${data.ipAddress}
` : ''} ${data.userAgent ? `Device: ${data.userAgent}` : ''}
` : ''}

Didn't request this?

If you didn't request a password reset, please ignore this email. Your password won't be changed unless you click the link above and create a new one.

For security reasons, we recommend:

Best regards,
The Security Team

`, text: (data) => ` Password Reset Request Hi${data.name ? ` ${data.name}` : ''}, We received a request to reset the password for your account associated with ${data.email}. Reset your password: ${data.resetLink} 🔒 Security Notice: This link will expire ${data.expiresIn || 'in 1 hour'} for your security. If you need to reset your password after this time, please request a new reset link. ${data.ipAddress || data.userAgent ? `Request Details: ${data.ipAddress ? `IP Address: ${data.ipAddress}` : ''} ${data.userAgent ? `Device: ${data.userAgent}` : ''}` : ''} Didn't request this? If you didn't request a password reset, please ignore this email. Your password won't be changed unless you click the link above and create a new one. For security reasons, we recommend: - Using a strong, unique password - Enabling two-factor authentication if available - Not sharing your password with anyone Best regards, The Security Team This is an automated message, please do not reply to this email. © 2024 Your Company. All rights reserved. `.trim(), }, }; export function ResetPasswordEmail(props: ResetPasswordEmailData) { return (

Password Reset Request

Hi{props.name ? ` ${props.name}` : ''},

We received a request to reset the password for your account associated with {props.email}.

Click the button below to reset your password:

Reset Password

Or copy and paste this link into your browser:

{props.resetLink}

🔒 Security Notice: This link will expire {props.expiresIn || 'in 1 hour'} for your security. If you need to reset your password after this time, please request a new reset link.
{(props.ipAddress || props.userAgent) && (
Request Details:
{props.ipAddress && <>IP Address: {props.ipAddress}
} {props.userAgent && <>Device: {props.userAgent}}
)}

Didn't request this?

If you didn't request a password reset, please ignore this email. Your password won't be changed unless you click the link above and create a new one.

For security reasons, we recommend:

  • Using a strong, unique password
  • Enabling two-factor authentication if available
  • Not sharing your password with anyone

Best regards,
The Security Team

This is an automated message, please do not reply to this email.

© 2024 Your Company. All rights reserved.

); }