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

334
Vistas
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
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