Files
rxminder/services/email.ts
William Valentin e48adbcb00 Initial commit: Complete NodeJS-native setup
- Migrated from Python pre-commit to NodeJS-native solution
- Reorganized documentation structure
- Set up Husky + lint-staged for efficient pre-commit hooks
- Fixed Dockerfile healthcheck issue
- Added comprehensive documentation index
2025-09-06 01:42:48 -07:00

27 lines
981 B
TypeScript

/**
* Mock email service for sending verification emails
*/
export class EmailService {
/**
* Simulates sending a verification email with a link to /verify-email?token=${token}
* @param email - The recipient's email address
* @param token - The verification token
*/
async sendVerificationEmail(email: string, token: string): Promise<void> {
// In a real implementation, this would send an actual email
// For this demo, we'll just log the action
console.log(
`📧 Sending verification email to ${email} with token: ${token}`
);
console.log(`🔗 Verification link: /verify-email?token=${token}`);
// Simulate network delay
await new Promise(resolve => setTimeout(resolve, 500));
// In a real implementation, we would make an HTTP request to an email service
// Example: await fetch('/api/send-email', { method: 'POST', body: JSON.stringify({ email, token }) });
}
}
export const emailService = new EmailService();