sendmail: allow display name to be set

This commit is contained in:
Girish Ramakrishnan
2022-05-31 17:53:09 -07:00
parent 176e917f51
commit 85af0d96d2
5 changed files with 41 additions and 9 deletions

View File

@@ -373,6 +373,7 @@ async function setMailbox(req, res, next) {
if (req.body.enable) {
if (req.body.mailboxName !== null && typeof req.body.mailboxName !== 'string') return next(new HttpError(400, 'mailboxName must be a string'));
if (typeof req.body.mailboxDomain !== 'string') return next(new HttpError(400, 'mailboxDomain must be a string'));
if (typeof req.body.mailboxDisplayName !== 'string') return next(new HttpError(400, 'mailboxDisplayName must be a string'));
}
const [error, result] = await safe(apps.setMailbox(req.app, req.body, AuditSource.fromRequest(req)));