/** * 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 { // In a real implementation, this would send an actual email // For this demo, we'll just log the action console.warn( `📧 Sending verification email to ${email} with token: ${token}` ); console.warn(`🔗 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();