I have an application with JS , Jquery and NoSQL DB . I don't have any backend technology such as Node or C# . my web UI directly interacts with DataBase.
Now after submitting data to DB, I want to send email notifications to users. I searched on internet and there are some articles which say we can't send emails with client side code as we deal with SMTP server.
the fallowing is from smtpjs.com
<script src="js/smtp.js"></script>
<script>
Email.send("vkxyz@abc.com",
"vk@nyu.edu",
"This is a subject",
"this is the body",
"smtp.qwe.io",
"vkxyz@abc.com",
"abcq4#");
</script>
the above snippet is not working. tried some other snippets available on internet but nothing works.
By the way my SMTP server has firewall and accepts from local network only. I din't get any connection error log with above code.
so is it possible to send email with JavaScript Jquery , if so please kindly suggest the best practice
Thanks in Advance