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(); } ); } }); });
Hi,
Check out this article about creating triggered emails.
Try
$w("#dataset3").onAfterSave( ()
(note the #)
Whait but it says type error: $w(..) onafterSave is not a function ..?
thanks~!
I think it might just not be working right now, my already existing and previously working triggered emails have also stopped working