diff --git a/.env.example b/.env.example index 53a2272..0493d67 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,6 @@ SMTP_HOST= SMTP_PORT=587 +SMTP_SECURE=true SMTP_USER= SMTP_PASS= FROM_EMAIL= diff --git a/src/pages/api/contact.ts b/src/pages/api/contact.ts index 293988c..6fd38af 100644 --- a/src/pages/api/contact.ts +++ b/src/pages/api/contact.ts @@ -6,7 +6,7 @@ export const prerender = false; const transporter = nodemailer.createTransport({ host: import.meta.env.SMTP_HOST, port: parseInt(import.meta.env.SMTP_PORT), - secure: import.meta.env.SMTP_PORT === "465", + secure: import.meta.env.SMTP_SECURE, auth: { user: import.meta.env.SMTP_USER, pass: import.meta.env.SMTP_PASS,