const config = require("../config"); const transporter = require("./transporterMail"); const sendConfirmationEmail = (userEmail, token) => { const confirmationLink = `${config.client_url}/verify-email?token=${token}`; const mailOptions = { from: config.mail_user, to: userEmail, subject: "Confirm Your Email Address - Learnup Bangladesh", html: ` Confirm Your Email

Welcome to Learnup Bangladesh!

Thank you for registering with us. Please confirm your email address by clicking the button below:

Confirm Email Address

If the button above doesn't work, copy and paste the following URL into your browser:

${confirmationLink}

If you didn't register, please ignore this email.

`, }; transporter.sendMail(mailOptions, (error, info) => { if (error) { console.error("Error sending email:", error); } else { console.log("Confirmation email sent:", info.response); } }); }; module.exports = sendConfirmationEmail;