Triggered Email

Update 03.04/2020 - reason for update to make this easier for people to help i have removed the large code section below and replaced with code blocks

ok Wix Code is

my code

The dynamic dataset has custom collection permissions i.e. anyone, anyone, anyone, anyone on the collection that presents and captures information from dynamic dataset

I am logged in when testing this code / page

I have published the site to check for email in my inbox and its not working for me.

The export function (update all) button is connected by the dataset icon, shows “your content has been submitted” text after click

and if i remove line 30, which saves the dynamic dataset, any new input, still successfully updates collection which is good via the connected (update all) button

also the console.log(“do something after the email was sent successfully”) does not print so i know this code is not firing but do not know why??

The triggered email has been published so should be fine with send details registered