feat: add email service with Nodemailer and 6 HTML templates
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>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { baseTemplate } from './base.js';
|
||||
|
||||
export function subscriptionExpiringEmail(data: { nombre: string; plan: string; expiresAt: string }): string {
|
||||
return baseTemplate(`
|
||||
<h2 style="color:#1e293b;margin:0 0 16px;">Tu Suscripción Vence Pronto</h2>
|
||||
<p style="color:#475569;line-height:1.6;">Hola ${data.nombre},</p>
|
||||
<p style="color:#475569;line-height:1.6;">Tu suscripción al plan <strong>${data.plan}</strong> vence el <strong>${data.expiresAt}</strong>.</p>
|
||||
<div style="background-color:#fffbeb;border-radius:8px;padding:16px;margin:16px 0;border-left:4px solid #f59e0b;">
|
||||
<p style="margin:0;color:#334155;">Para evitar interrupciones en el servicio, asegúrate de que tu método de pago esté actualizado.</p>
|
||||
</div>
|
||||
<p style="color:#475569;line-height:1.6;">Si tienes alguna pregunta sobre tu suscripción, contacta a soporte.</p>
|
||||
`);
|
||||
}
|
||||
Reference in New Issue
Block a user