Implemented email verification
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { env } from 'process'
|
||||
import SMTPTransport from 'nodemailer/lib/smtp-transport'
|
||||
import { env } from '@/lib/utils'
|
||||
|
||||
export const from: string = `"${env.MAIL_SERVER_SENDER_NAME}" <${env.MAIL_SERVER_USERNAME}>`
|
||||
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
|
||||
host: env('MAIL_SERVER_HOST'),
|
||||
debug: env('MAIL_SERVER_DEBUG') === 'true' && env('NODE_ENV') !== 'production',
|
||||
logger: env('MAIL_SERVER_LOG') === 'true' && env('NODE_ENV') !== 'production',
|
||||
port: parseInt(env('MAIL_SERVER_PORT')),
|
||||
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,
|
||||
user: env('MAIL_SERVER_USERNAME'), pass: env('MAIL_SERVER_PASSWORD'),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user