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

333
Views
Button not working in email when sending email via nodemailer

Im sending a simple email via node mailer.

But i can't seem to make the href work, when I click the button in the email it doesn't go anywhere.

  const link = `http://localhost:3000/reset-password/${user._id}/${token}`;
  const output = `
    <h1>You have requasted an password rest. Follow the above link to reset password</h1>
    <button><a href="${link}">Click here</a></button>
    <h3>This is a test</h3>   
  `;

  let transporter = nodemailer.createTransport({
    service: "gmail",
    auth: {
      user: process.env.EMAIL
      pass: process.env.PASSWORD
    },
  });

  // Step 2
  let mailOptions = {
    from: "SOME_EMAIL",
    to: user.email, // TODO: email receiver
    subject: "Password Reset",
    html: output,
  };

When I inspect that html in the email, it seems that the HREF doesnt render

over 4 years ago · Santiago Trujillo
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!