Remove all async/await stuff

This commit is contained in:
Vortrex
2023-02-21 14:39:45 -06:00
parent 1cb02b9ab1
commit b4ac02f9ec
13 changed files with 100 additions and 94 deletions

View File

@@ -21,28 +21,28 @@ function initEmailScript() {
// ===========================================================================
async function sendEmail(toEmail, toName, subject, body) {
function sendEmail(toEmail, toName, subject, body) {
switch (getEmailConfig().method) {
case V_EMAIL_METHOD_SMTP_MODULE:
if (!checkForSMTPModule()) {
return false;
}
Promise.resolve().then(() => {
module.smtp.send(
getEmailConfig().smtp.host,
getEmailConfig().smtp.port,
intToBool(getEmailConfig().smtp.useTLS),
getEmailConfig().smtp.username,
getEmailConfig().smtp.password,
toEmail,
toName,
subject,
body,
getEmailConfig().smtp.from,
getEmailConfig().smtp.fromName
);
});
//Promise.resolve().then(() => {
module.smtp.send(
getEmailConfig().smtp.host,
getEmailConfig().smtp.port,
intToBool(getEmailConfig().smtp.useTLS),
getEmailConfig().smtp.username,
getEmailConfig().smtp.password,
toEmail,
toName,
subject,
body,
getEmailConfig().smtp.from,
getEmailConfig().smtp.fromName
);
//});
break;
case V_EMAIL_METHOD_GET_REQUEST: