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

162
Vistas
Cómo enviar un correo electrónico a un usuario específico usando emailJS en reactJS

Quiero enviar cotizaciones a usuarios específicos que han hecho un envío en mi sitio web de reacción. Estoy usando emailjs, pero parece que no funciona. Quiero una forma que no sea del lado del servidor para hacer esto.

aquí está mi código:

 const {freight, creatorsEmail} = useLocation().state; //creatoresEmail is the email of the user i want to send the email to. function sendEmail(e){ e.preventDefault() emailjs.sendForm( "xxxxx", "xxxxxx", creatorsEmail, "xxxxx" ).then((res) => { if(res){ firebase.firestore().collection("Quotations").add({ costPrice:costPrice, sellPrice:sellPrice, creatorsEmail:creatorsEmail, freight:freight }).then((result) => { alert("Quotation Sent Successfully") window.location.reload() }).catch((e) => { alert("An Error Occured, Quotation Cannot be Sent") console.log(e) }) } }).catch((e) => { alert("There was a problem") console.log(e) }) } <Button color="primary" variant="contained" onclick={sendEmail} // in here would this be a correct way of calling the function sendEmail(e)? > Send Quotation </Button>
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