fix(mail): migrate filesystem helpers to fsUtils, update DKIM and mail APIs, harden SMTP client, and bump dependencies

This commit is contained in:
2026-02-01 14:17:54 +00:00
parent dd4ac9fa3d
commit d54831765b
38 changed files with 3923 additions and 5335 deletions

View File

@@ -68,15 +68,13 @@ export class SmsService {
recipients: [{ msisdn: toNumber }],
};
const resp = await plugins.smartrequest.request('https://gatewayapi.com/rest/mtsms', {
method: 'POST',
requestBody: JSON.stringify(payload),
headers: {
Authorization: `Basic ${Buffer.from(`${this.config.apiGatewayApiToken}:`).toString('base64')}`,
'Content-Type': 'application/json',
},
});
const json = await resp.body;
const resp = await plugins.smartrequest.SmartRequestClient.create()
.url('https://gatewayapi.com/rest/mtsms')
.header('Authorization', `Basic ${Buffer.from(`${this.config.apiGatewayApiToken}:`).toString('base64')}`)
.header('Content-Type', 'application/json')
.json(payload)
.post();
const json = resp.body;
logger.log('info', `sent an sms to ${toNumber} with text '${messageText}'`, {
eventType: 'sentSms',
sms: {