completionId: cgen-2771ae9c6d05469888bfccea597f7dae
cgen-2771ae9c6d05469888bfccea597f7dae
This commit is contained in:
parent
0751efb574
commit
fd7baef1d4
1 changed files with 11 additions and 1 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in a new issue