import { UserModel } from "../../models/User"; import { LOGGER } from "../../util/Logger"; import { createTransport } from "../Email"; export default async (user: UserModel) => { const transporter = createTransport(); const mailOpts = { to: user.email, from: process.env.NODEMAILER_ADDRESS, subject: `Please Verify your Email Address for ${process.env.APP_NAME}`, html: ` Verify Your Email Address for ${process.env.APP_NAME}
 
logo
 
 

Please Validate your Email

A new account for ${process.env.APP_NAME} has been registered to this email address.

To verify this email, press the button below. If you did not register with this email address, you can ignore this email entirely.

Verify Email
 
 

© http://${process.env.URL}/

 
`, }; try { await transporter.sendMail(mailOpts); } catch (ex) { LOGGER.error(ex); } };