import { env } from 'process' import SMTPTransport from 'nodemailer/lib/smtp-transport' export const from: string = `"${env.MAIL_SERVER_SENDER_NAME}" <${env.MAIL_SERVER_USERNAME}>` export const transportOptions: SMTPTransport | SMTPTransport.Options | string = { host: env.MAIL_SERVER_HOST, debug: env.MAIL_SERVER_DEBUG === 'true', logger: env.MAIL_SERVER_LOG === 'true', port: parseInt(env.MAIL_SERVER_PORT as string), secure: env.MAIL_SERVER_PORT === '465', // Use `true` for port 465, `false` for all other ports auth: { user: env.MAIL_SERVER_USERNAME, pass: env.MAIL_SERVER_PASSWORD, }, }