Simply install to your project:
sampctl package install Fairuz-Afdhal/SAMPMailJS
Include in your code and begin using the library:
#include <SAMPMailJS>
SendEmail(name[], to[], subject[], text[], bool:isTemplate = false, templateName[] = "default.html")
name: The name that will appear next to your email (string)
to: The email address you want to send the email to (string)
subject: The subject of your email (string)
isTemplate: When set to false, it will only send the text you input in the argument text. When set to true, it will try to use a template. (boolean)
templateName: The file name of the template that must be in the same folder of your NodeJS script. (string)
To test, simply run the package:
sampctl package run