move server routes into /system
This commit is contained in:
12
src/mail.js
12
src/mail.js
@@ -57,6 +57,8 @@ exports = module.exports = {
|
||||
delList,
|
||||
resolveList,
|
||||
|
||||
checkStatus,
|
||||
|
||||
OWNERTYPE_USER: 'user',
|
||||
OWNERTYPE_GROUP: 'group',
|
||||
OWNERTYPE_APP: 'app',
|
||||
@@ -90,6 +92,7 @@ const assert = require('assert'),
|
||||
net = require('net'),
|
||||
network = require('./network.js'),
|
||||
nodemailer = require('nodemailer'),
|
||||
notifications = require('./notifications.js'),
|
||||
os = require('os'),
|
||||
path = require('path'),
|
||||
paths = require('./paths.js'),
|
||||
@@ -1503,3 +1506,12 @@ async function resolveList(listName, listDomain) {
|
||||
|
||||
return { resolvedMembers, list };
|
||||
}
|
||||
|
||||
async function checkStatus() {
|
||||
const result = await checkConfiguration();
|
||||
if (result.status) {
|
||||
await notifications.clearAlert(notifications.ALERT_MAIL_STATUS, 'Email is not configured properly');
|
||||
} else {
|
||||
await notifications.alert(notifications.ALERT_MAIL_STATUS, 'Email is not configured properly', result.message, { persist: true });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user