import nodemailer from "nodemailer"; export default function handler(req, res) { const { email, subject, emailcontenttitle, emailcontent } = req.body; console.log(email); //console.log(process.env); const client = nodemailer.createTransport({ auth: { user: process.env.EMAIL_SERVER_USER, pass: process.env.EMAIL_SERVER_PASSWORD, }, host: process.env.EMAIL_SERVER_HOST, port: process.env.EMAIL_SERVER_PORT, secure: true, }); //console.log(client); // Some simple styling options const backgroundColor = "#ffffff"; const textColor = "#444444"; const mainBackgroundColor = "#ffffff"; const buttonBackgroundColor = "#aa1111"; const buttonBorderColor = "#aa1111"; const buttonTextColor = "#ffffff"; const headerBackgroundColor = "#000000"; const url = process.env.API_ROOT; let emailBodyContent = `
| ${emailcontenttitle} |
| ${emailcontent} |
| If you did not request this email you can safely ignore it. |