completionId: cgen-2771ae9c6d05469888bfccea597f7dae

cgen-2771ae9c6d05469888bfccea597f7dae
This commit is contained in:
Builder.io 2025-11-05 04:22:48 +00:00
parent 0751efb574
commit fd7baef1d4

View file

@ -52,7 +52,16 @@ function getTransporter() {
export const emailService = {
get isConfigured() {
return Boolean(smtpHost && smtpUser && smtpPassword);
const configured = Boolean(smtpHost && smtpUser && smtpPassword);
if (!configured) {
console.warn("[EmailService] Not configured. Env check:", {
SMTP_HOST: smtpHost ? "set" : "MISSING",
SMTP_USER: smtpUser ? "set" : "MISSING",
SMTP_PASSWORD: smtpPassword ? "set" : "MISSING",
SMTP_PORT: smtpPort,
});
}
return configured;
},
async sendVerificationEmail(params: {
@ -60,6 +69,7 @@ export const emailService = {
verificationUrl: string;
fullName?: string | null;
}) {
console.log("[EmailService] sendVerificationEmail called for:", params.to);
const transporter = getTransporter();
const { to, verificationUrl, fullName } = params;
const safeName = fullName?.trim() || "there";