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
Thank you for yours answers
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
Thank you for yours answers
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));
});
});