I have a bunch of triggered emails that were working this morning on my dynamic pages for form entries. They were working this morning. I use the create a new contact coding for each one because we don’t want direct site members.
Site URL: https://www.sleepyhollowtarrytownchamber.com/
They all follow this code structure:
import wixCrm from 'wix-crm';
$w.onReady(function () {
});
export function submit_click(event) {
wixCrm.createContact({
"firstName": $w('#input2').value,
"emails": [$w("#input3").value],
"business_name": $w("#company").value
})
.then((contactId) => {
wixCrm.emailContact("TTApproved", contactId, {
"variables": {
"company_name": $w('#company').value,
}
})
.then(() => {
// do something after the email was sent
})
.catch((err) => {
// handle the error if the email wasn't sent
});
});
}
I need to fix this ASAP. My client is very angry that it just stopped working.