Fix squirrel thread

This commit is contained in:
Vortrex
2022-09-20 02:40:15 -05:00
parent b01baa7302
commit 26f3ad8cef

View File

@@ -9,16 +9,16 @@
// ===========================================================================
bindEventHandler("OnResourceStart", thisResource, function(event, resource) {
emailThread <- newthread("sendEmail");
emailThread <- newthread(sendEmail);
exportFunction("sendEmailSquirrel", function(smtpHost, smtpPort, useTLS, smtpUser, smtpPassword, toEmail, toName, subject, body, fromEmail, fromName) {
exportFunction("sendEmail", function(smtpHost, smtpPort, useTLS, smtpUser, smtpPassword, toEmail, toName, subject, body, fromEmail, fromName) {
emailThread.call(smtpHost, smtpPort, useTLS, smtpUser, smtpPassword, toEmail, toName, subject, body, fromEmail, fromName);
});
});
// ===========================================================================
function sendEmailSquirrel(smtpHost, smtpPort, useTLS, smtpUser, smtpPassword, toEmail, toName, subject, body, fromEmail, fromName) {
function sendEmail(smtpHost, smtpPort, useTLS, smtpUser, smtpPassword, toEmail, toName, subject, body, fromEmail, fromName) {
module.smtp.send(smtpHost, smtpPort, useTLS, smtpUser, smtpPassword, toEmail, toName, subject, body, fromEmail, fromName);
}