show error in case SMTP configuration is not done

This commit is contained in:
lesion
2021-10-21 12:18:18 +02:00
parent 140a759d9c
commit 02e737e074

View File

@@ -8,6 +8,10 @@ const locales = require('../../locales')
const mail = {
send (addresses, template, locals, locale = settingsController.settings.instance_locale) {
if (!settingsController.settings.admin_email || !settingsController.settings.smtp) {
log.error(`Cannot send any email: SMTP Email configuration not completed!`)
return
}
log.debug(`Enqueue new email ${template} ${locale}`)
const task = new Task({
name: 'MAIL',