feat: show email used count

This commit is contained in:
prafull-opensignlabs
2024-09-05 18:36:30 +05:30
parent 3eaba55823
commit af2666c83d
4 changed files with 21 additions and 19 deletions
@@ -216,7 +216,7 @@ async function sendmailv3(req) {
}
} else {
if (Plan && Plan === 'freeplan') {
let MontlyfreeEmails = _extRes?.MontlyfreeEmails || 0;
let MonthlyFreeEmails = _extRes?.MonthlyFreeEmails || 0;
if (_extRes?.LastEmailCountReset?.iso) {
const lastDate = new Date(_extRes?.LastEmailCountReset?.iso);
const newDate = new Date();
@@ -225,7 +225,7 @@ async function sendmailv3(req) {
const nonCustomMail = await sendMailProvider(req, Plan, true);
return nonCustomMail;
} else {
if (MontlyfreeEmails >= 20) {
if (MonthlyFreeEmails >= 20) {
return { status: 'quota-reached' };
} else {
const nonCustomMail = await sendMailProvider(req, Plan);