fix(build): modernize package configuration, dependencies, and test setup for current toolchain compatibility
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartsmtp',
|
||||
version: '3.0.3',
|
||||
description: 'a module for handling smtp stuff'
|
||||
name: '@push.rocks/smartsmtp',
|
||||
version: '3.0.4',
|
||||
description: 'A module for handling SMTP operations such as sending emails via SMTP or sendmail transport.'
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@ export class Smartsmtp {
|
||||
* sends a SmartMail
|
||||
*/
|
||||
public async sendSmartMail(
|
||||
smartmailArg: plugins.smartmail.Smartmail<any>,
|
||||
smartmailArg: plugins.smartmail.Smartmail<Record<string, unknown>>,
|
||||
toArg: string,
|
||||
dataArg = {}
|
||||
dataArg: Record<string, unknown> = {},
|
||||
) {
|
||||
const message: plugins.nodemailer.SendMailOptions = {
|
||||
from: smartmailArg.options.from,
|
||||
@@ -55,15 +55,12 @@ export class Smartsmtp {
|
||||
|
||||
// lets add attachments from smartmailArg
|
||||
for (const attachment of smartmailArg.attachments) {
|
||||
message.attachments.push({
|
||||
message.attachments!.push({
|
||||
filename: attachment.parsedPath.base,
|
||||
content: attachment.contentBuffer,
|
||||
});
|
||||
}
|
||||
|
||||
const response = await this.nodemailerTransport.sendMail(message).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
return response;
|
||||
return this.nodemailerTransport.sendMail(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @pushrocks scope
|
||||
import * as smartmail from '@pushrocks/smartmail';
|
||||
// @push.rocks scope
|
||||
import * as smartmail from '@push.rocks/smartmail';
|
||||
|
||||
export { smartmail };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user