Replaced the previous e-mail verification process for our own
This commit is contained in:
@@ -10,7 +10,7 @@ interface MailOptions {
|
||||
context: object;
|
||||
}
|
||||
|
||||
export function prepareMailer(): nodemailer.Transporter {
|
||||
export function prepareMailer(template?: string): nodemailer.Transporter {
|
||||
const transport = nodemailer.createTransport({
|
||||
host: process.env.SMTP_HOST,
|
||||
auth: {
|
||||
@@ -22,7 +22,7 @@ export function prepareMailer(): nodemailer.Transporter {
|
||||
const handlebarOptions: hbs.NodemailerExpressHandlebarsOptions = {
|
||||
viewEngine: {
|
||||
partialsDir: path.resolve("src/email/templates"),
|
||||
defaultLayout: "src/email/templates/main",
|
||||
defaultLayout: `src/email/templates/${template || "main"}`,
|
||||
},
|
||||
viewPath: path.resolve("src/email/templates"),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user