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

175
Vistas
using EmaiJS, error on service and template ID

I am currently experimenting with the EmailJS library, I have followed the documentation to what I thought was 100%, I placed the code in the script tag that is embedded in the head on the contact.html, when I send the form, I get a error in the console that says "unexcepted", I created a file called sendEmail.js and wired it to my contact.html, and tried it there, here is the issue:

I am being told that my service ID is incorrect, I went, updated it, and then was told my template ID is incorrect too, so I updated that, saved it and tried again, its still not working, please see attached screenshot of the details on my test emailJS account:

Service ID: Service ID

Template ID: Template ID

Here is my contact.html code: This is my init method in the

 <script type="text/javascript">
    (function() {
        emailjs.init("user_vanqZMkpPOADQP2iEpqKS");
    })();
</script>

Here is my form code:

<form onsubmit="return sendMail(this);">
                <input type="text" name="name" class="form-control" id="fullname" placeholder="Name" required/>
                <input type="text" name="emailaddress" class="form-control" id="emailaddress" placeholder="Email" required/>
                <textarea rows="5" name="projectsummary" class="form-control" id="projectsummary" placeholder="Project Description" required></textarea>
                <button type="submit" class="btn btn-secondary center-block">Send Project Request</button>
            </form>

Here is my sendEmail.js code:

// function has one one argument "contactForm"

function sendMail(contactForm) {

const templateParams = {
    "from_name": contactForm.name.value,
    "project_request": contactForm.projectsummary.value,
    "from_email": contactForm.emailaddress.value
};

const serviceID = "service_golcdlt";
const templateID = "template_7qaoafp";

// Service ID, Template ID, template parameters
emailjs.send(serviceID, templateID, templateParams)
    .then(
        function(response) {
            console.log("SUCCESS", response)
        },
        function(error) {
            console.log("Error: Unable to send", error)
        }
    );

    return false; // To block from loading a new page
};

What am I missing or doing wrong?

about 4 years ago · Santiago Trujillo
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