This commit is contained in:
Esteban Paz 2026-08-02 11:44:26 -05:00
parent b63ca6089e
commit a4cae16a50
1 changed files with 1 additions and 2 deletions

View File

@ -95,8 +95,7 @@ export async function sendEmailCf(data: Record<string, string>, to: string, type
text, text,
}); });
const deliveredOrQueued = [...response.delivered, ...response.queued]; if (!response.delivered) {
if (!deliveredOrQueued.includes(to) || response.permanent_bounces.includes(to)) {
console.error("Cloudflare email not delivered", response); console.error("Cloudflare email not delivered", response);
throw new Error("El correo no fue entregado"); throw new Error("El correo no fue entregado");
} }