Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

324
Vistas
How can i get data from mail to nodejs server

I am creating the the web app that send mail through nodejs . however when user click on send button the message get send as a mail to another user. But it is send as with username and pass(mail-id) as per the in auth section in nodemailer configuration. I want to send html with form/data and button so that when reciver click on its gets redirect to another page and must be able to access its gmail-id and some data/form values in that page so that i can create reply form .

 var mail = nodemailer.createTransport({
                service: 'gmail',
                auth: {
              
                    user:'example@gmail.com',
                  pass: process.env.mail_server
                }
              });

              var mailOptions = {
                from: userSending@gmail.Email,
                to: userReciving@gmail.Email,
                subject: data.subject,
                html:`<div><p>  message ${data}</p></div>
               <form action="/path" method="post">
               <button type="button" name="send" value="send" >Send</button>
                </form>`
                        
              
              };

              mail.sendMail(mailOptions, function(error, info){
                  console.log("running")
                if (error) {
                  console.log(error);
                } else {
                  console.log('Email sent: ' + info.response);
                }
              });

NOTE :1) here i must be able to use "data " define in html of nodemailer and 2) gmail of one when click on send button

Note:please mention another approach if you find .

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda