init
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
const { AdminNotificationRequest, addToQueue, configs, init } = require('@brojs/mailer');
|
||||
|
||||
const rc = require('./.serverrc');
|
||||
const pkg = require('../package');
|
||||
|
||||
init({
|
||||
userName: process.env.SMTP_MAIL_LOGIN,
|
||||
password: process.env.SMTP_MAIL_PASSWORD,
|
||||
adminMails: process.env.MAIL_TO_1,
|
||||
smtpConfig: configs.yandex,
|
||||
queTimer: rc.mailStepTimer,
|
||||
});
|
||||
|
||||
if (process.env.MAIL_TO_1 && process.env.NODE_ENV === 'production') {
|
||||
addToQueue(new AdminNotificationRequest(`Деплой kc админки v${pkg.version} прошёл успешно (${process.env.ADMIN_FRONT_BASE_NAME}) (Время ${new Date().toLocaleString()})`));
|
||||
}
|
||||
Reference in New Issue
Block a user