send email on form update/delete

I have a form that collects user input. When the user hit summit button, it takes them to the review page to allow them to update/confirm and delete their entry.

Now I want to add an email when user update/confirm or delete their entry. I tried to the sendgrid sample script and it does not seem to work. The console does not have any logs about email getting kicked off.

Do I still use "onAfterSave(sendFormData)’ for update? How about delete? I also checked all the sendGrid scripts and could not find anything wrong with it.

Thanks!

Assuming you would have separate buttons for update and delete entries etc, then simply use a triggered email with an onAfterSave, so that when they either update or delete something that specific triggered email gets sent to the user.

Thanks! One more question, does sendgrid have problem with yahoo email address? My yahoo email address could never receive emails. But my outlook account can receive without any problem. Tried the sendGrid NPM module and it’s the same.

If sendgrid is not stable, any other alternative to use to send email reliably? Thanks!

I’ve never had any issues with my own code for it when I used this SendGrid and Wix tutorial for sending an email on form submission.
https://support.wix.com/en/article/corvid-tutorial-sending-an-email-on-form-submission

However, I went one step further and setup Server and Domain Authentication with SendGrid too.
https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/

Although, you can do similar with Wix Automations.
https://support.wix.com/en/article/sending-automated-response-emails-to-contacts

Or sending a triggered email to Contacts (uses Wix CRM)
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-contacts

Or sending a triggered email to Members (uses Wix Users)
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-members

It’s not a stability issue, it most likely is a permissions issue.
Google SPF sender policy framework .

Thanks for all those information. I still have one question. I am just trying to build a simple free website with a few pages. I don’t have a domain name. How do I do authentication with sendgrid if I am using the wix free account with no own domain? Thanks!