text: const sgMail = require("@sendgrid/mail");
  sgMail.setApiKey(process.env.SENDGRID_API_KEY);
  
  exports.emailFeedback = (req, res) => {
    const { name, email, phone, message, uploadedFiles } = req.body;
    const emailData = {
      to: process.env.EMAIL_TO,
      from: email,
      subject: "Feedback Form",
      html: `
      <h1>Customer Feedback Form</h1>
      <hr />
      <h2>Sender Name: ${name}</h2>
      <h2>Sender Email: ${email}</h2>
      <h2>Sender Message: ${message}</h2>
      <br/>
      ${uploadedFiles.map((f) => {
        return `<img src="${f.secure_url}" alt="${f.original_filename}" style="width:50%;overflow:hidden:padding50%" /> `;
      })}
      `,
    };
    sgMail
      .send(emailData)
      .then((sent) => {
        return res.json({
          success: true,
        });
      })
      .catch((err) => {
        return res.json({
          success: false,
        });
      });
  };
  