main #74
|
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue