Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

325
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!