I have a built an email form in a modal instance using AngularJS that contains the field sending email, recipient email, subject, and email content. The form uses input boxes and ng-models to keep track of the data. When the user hits the send button on this form, I would like to send all of the information collected by the models to the server to send an email.
Currently, I have a draft button and when the user hits the draft button, I send all of the information collected in the models to a controller who sends it to a service so that I can repopulate the information if the user decides to close the modal instance and send the email later. However, if the user hits the send button, I have this object with all of the information but don't know how to send it to the server. I'm very new to node.js and backend in general so if you someone could provide a concrete short example for me to learn from that would be great.
I'm looking to use the nodemailer module which I have installed using npm.
Thanks!