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>
14 lines
880 B
TypeScript
14 lines
880 B
TypeScript
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>
|
|
`);
|
|
}
|