17 lines
645 B
JavaScript
17 lines
645 B
JavaScript
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()})`));
|
|
}
|