EmailService with mock fallback when SMTP not configured. Templates: welcome, fiel-notification, payment-confirmed, payment-failed, subscription-expiring, subscription-cancelled. Uses Google Workspace SMTP (STARTTLS). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 lines
1.1 KiB
TypeScript
16 lines
1.1 KiB
TypeScript
import { baseTemplate } from './base.js';
|
|
|
|
export function welcomeEmail(data: { nombre: string; email: string; tempPassword: string }): string {
|
|
return baseTemplate(`
|
|
<h2 style="color:#1e293b;margin:0 0 16px;">Bienvenido a Horux360</h2>
|
|
<p style="color:#475569;line-height:1.6;">Hola ${data.nombre},</p>
|
|
<p style="color:#475569;line-height:1.6;">Tu cuenta ha sido creada exitosamente. Aquí tienes tus credenciales de acceso:</p>
|
|
<div style="background-color:#f1f5f9;border-radius:8px;padding:16px;margin:16px 0;">
|
|
<p style="margin:0;color:#334155;"><strong>Email:</strong> ${data.email}</p>
|
|
<p style="margin:8px 0 0;color:#334155;"><strong>Contraseña temporal:</strong> ${data.tempPassword}</p>
|
|
</div>
|
|
<p style="color:#475569;line-height:1.6;">Te recomendamos cambiar tu contraseña después de iniciar sesión.</p>
|
|
<a href="https://horux360.consultoria-as.com/login" style="display:inline-block;background-color:#2563eb;color:#ffffff;padding:12px 24px;border-radius:6px;text-decoration:none;margin-top:16px;">Iniciar sesión</a>
|
|
`);
|
|
}
|