Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

320
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda