Skip to content
Send mails through SAMP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates Multiple changes Jul 29, 2018
.gitattributes Initial commit Jun 5, 2018
LICENSE Initial commit Jun 5, 2018
sampmail.js Multiple changes Jul 29, 2018 Minor fixes Jun 17, 2018


Use this include to send emails directly trough a gmail account. This will prevent that your mails end on the spam folder. We now support custom SMTP servers.


Please check the Wiki for more information and documentation. Learn more


You must install the dependencies below

strlib Github Repository

nodejs Official Download Site

nodemailer npm install nodemailer --save

http npm install http --save

url npm install url --save

fs npm install fs --save


SendEmail(name[], to[], subject[], text[], bool:isTemplate = false, templateName[] = "default.html")

Parameters Guide:

 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)
You can’t perform that action at this time.