Sending triggered email has mind of its own

Your code looks OK upon inspection. A couple things you can do to try to narrow down what’s wrong…

Your current code has a .catch() for emailContact() . You should display the error that you are getting, like this:

console.log("error", err);

Add another .catch() to the createContact() call, again displaying the error.

Hopefully this will shed some light on what’s going on.