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

418
Views
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 answers
Answer question

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 Report
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!