Skip to content

Commit

Permalink
Create contact.js
Browse files Browse the repository at this point in the history
  • Loading branch information
smellysox1 authored Jun 22, 2024
1 parent 935294b commit 2b86f5e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions create-account/contact.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
(function () {
emailjs.init("3cguN9VXD2T04KNVy");
})();

function sendFeedback() {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var message = document.getElementById("message").value;

var templateParams = {
from_name: name,
from_email: email,
message: message
};

emailjs.send('service_3ff5xym', 'template_jv9m0fn', templateParams)
.then(function (response) {
document.getElementById('success').classList.remove('d-none');
console.log('SUCCESS!', response.status, response.text);
}, function (error) {
document.getElementById('failure').classList.remove('d-none');
console.log('FAILED...', error);
});

return false;
}

0 comments on commit 2b86f5e

Please sign in to comment.