Hey there is this new wix update!! Where you can trigger an email after an action I tried but did not succeeded.This is my code someone help me please
$w.onReady( function () {
$w(“dataset3”).onAfterSave( () => {
if (wixUsers.currentUser.loggedIn) {
const userId = wixUsers.currentUser.id;
wixUsers.emailUser(‘contactbericht’, userID, {
} ) .then( () => {
$w('#text220').show();
} )
. **catch** ( (err) => {
$w('#text219').show();
} );
}
});
});