You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to emailjs. I am getting the following error when trying to send a form via emailjs: ERR_NAME_NOT_RESOLVED. Please tell me what I am doing wrong. Here is the code I'm using.
$("#signup_form").on("submit", function(event) {
event.preventDefault();
const data = {
service_id: "service_xxxxxx",
template_id: "template_xxxxxx",
user_id: "vyyLyb0rmhCplS4P3",
template_params: {
username: "xxxxxx",
to_email: "xxxxxx@gmail.com",
name: "xxxxxx",
message: "This is a test."
}
};
console.log("Made it here.");
$.ajax('https://api/emailjs.com/api/v1.0/email/send', {
type: 'POST',
data: JSON.stringify(data),
contentType: 'application/json'
}).done(function() {
alert('Your mail is sent!');
}).fail(function(error) {
alert('Oops... ' + JSON.stringify(error));
});
});
I make it to the console.log(), but the ajax call triggers the fail alert(). Any help would be appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to emailjs. I am getting the following error when trying to send a form via emailjs: ERR_NAME_NOT_RESOLVED. Please tell me what I am doing wrong. Here is the code I'm using.
I make it to the console.log(), but the ajax call triggers the fail alert(). Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions