emailer
This commit is contained in:
18
src/mailer.ts
Normal file
18
src/mailer.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { AdminNotificationRequest, addToQueue, configs, init } from '@ijl/mailer'
|
||||
import pkg from '../package.json'
|
||||
|
||||
init({
|
||||
userName: process.env.SMTP_MAIL_LOGIN,
|
||||
password: process.env.SMTP_MAIL_PASSWORD,
|
||||
adminMails: process.env.MAIL_TO_1,
|
||||
smtpConfig: configs.yandex,
|
||||
reserveService: 'gmail',
|
||||
reserveLogin: process.env.MAIL_SERVICE_LOGIN,
|
||||
reservePasswd: process.env.MAIL_SERVICE_PASS,
|
||||
queTimer: process.env.RC_MAIL_STEP_TIMER,
|
||||
})
|
||||
|
||||
if (process.env.MAIL_TO_1 && process.env.MODE !== 'dev') {
|
||||
addToQueue(new AdminNotificationRequest(`Деплой админки v${pkg.version} прошёл успешно`))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user