diff --git a/lib/email.ts b/lib/email.ts index 84a0658c82..6f9fc1f7d3 100644 --- a/lib/email.ts +++ b/lib/email.ts @@ -15,7 +15,7 @@ export const sendEmail = async (emailData: sendEmailData) => { let transporter = nodemailer.createTransport({ host: serverRuntimeConfig.smtpHost, port: serverRuntimeConfig.smtpPort, - secure: serverRuntimeConfig.smtpSecureEnabled || false, // true for 465, false for other ports + secure: serverRuntimeConfig.smtpSecureEnabled, // true for 465, false for other ports auth: { user: serverRuntimeConfig.smtpUser, pass: serverRuntimeConfig.smtpPassword, @@ -56,4 +56,4 @@ export const sendVerificationEmail = async (user) => {
Your snoopForms Team`, }); -}; \ No newline at end of file +}; diff --git a/lib/telemetry.ts b/lib/telemetry.ts index c9609c9561..450fa6259d 100644 --- a/lib/telemetry.ts +++ b/lib/telemetry.ts @@ -11,7 +11,6 @@ const { serverRuntimeConfig } = getConfig(); export const sendTelemetry = (event: string) => { if ( - process.env.NODE_ENV === "production" && serverRuntimeConfig.nextauthUrl !== "http://localhost:3000" && !serverRuntimeConfig.telemetryDisabled ) { diff --git a/next.config.js b/next.config.js index 172bd0479a..30fda4f170 100644 --- a/next.config.js +++ b/next.config.js @@ -12,7 +12,7 @@ const nextConfig = { smtpPort: process.env.SMTP_PORT, smtpUser: process.env.SMTP_USER, smtpPassword: process.env.SMTP_PASSWORD, - smtpSecureEnabled: process.env.SMTP_SECURE_ENABLED, + smtpSecureEnabled: process.env.SMTP_SECURE_ENABLED === "1", posthogApiHost: process.env.POSTHOG_API_HOST, posthogApiKey: process.env.POSTHOG_API_KEY, telemetryDisabled: process.env.TELEMETRY_DISABLED === "1",