fix(mail): migrate filesystem helpers to fsUtils, update DKIM and mail APIs, harden SMTP client, and bump dependencies
This commit is contained in:
@@ -613,17 +613,18 @@ export class Email {
|
||||
}
|
||||
|
||||
// Add attachments
|
||||
const smartFileFactory = plugins.smartfile.SmartFileFactory.nodeFs();
|
||||
for (const attachment of this.attachments) {
|
||||
const smartAttachment = await plugins.smartfile.SmartFile.fromBuffer(
|
||||
const smartAttachment = smartFileFactory.fromBuffer(
|
||||
attachment.filename,
|
||||
attachment.content
|
||||
);
|
||||
|
||||
|
||||
// Set content type if available
|
||||
if (attachment.contentType) {
|
||||
(smartAttachment as any).contentType = attachment.contentType;
|
||||
}
|
||||
|
||||
|
||||
smartmail.addAttachment(smartAttachment);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user