You can include any script in your script and use that to send your email. Are you using lua or bash, youre talking about php aswell? You can include php scripts in php scripts and lua scripts in lua scripts.
If you're using lua you can use resource/functions/send_mail.lua script (include it in...