I am trying to trigger an email when a new user submits a form with his email address. I followed the tutorial but still it is not sending any email. This is the form setup. It is connected to a database, which is working well.
This is how my code looks, where email should get triggered with onclick button on subscribe button.
I even checked the console log in browser, I am getting the error.
Can someone inform me what is wrong with my code?