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

419
Vistas
emailJS POST https://api.emailjs.com/api/v1.0/email/send 400 reactjs

I have this problem 400. I use Emailjs i put the good id but form doesn't send. I don't understand why.I think is the problem with emailjs.min.js

error

index.html

email

Thank you for yours answers

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I looked at your index.html and I only see where you passed in your user ID. Can you post the part where you have to pull the form data from the html inputs and append them to a new Form object? This is more or less the main side of the code, I used jQuery to handle it. Example.

 $('#contact-form').on('submit', function(event) {
    event.preventDefault(); // prevent reload
    
    let formData = new FormData(this);
    formData.append('service_id', 'default_service');
    formData.append('template_id', 'template_mezfpy6');
    formData.append('user_id', 'user_ID');
 
    $.ajax('https://api.emailjs.com/api/v1.0/email/send-form', {
        type: 'POST',
        data: formData,
        contentType: false, // auto-detection
        processData: false // no need to parse formData to string
    }).done(function() {
        console.log('Your mail is sent!');
    }).fail(function(error) {
        alert('Oops... ' + JSON.stringify(error));
    });
});

about 4 years ago · Juan Pablo Isaza Denunciar
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