feat(storage): add comprehensive tests for StorageManager with memory, filesystem, and custom function backends
feat(email): implement EmailSendJob class for robust email delivery with retry logic and MX record resolution feat(mail): restructure mail module exports for simplified access to core and delivery functionalities
This commit is contained in:
@@ -404,7 +404,7 @@ export class EmailSendJob {
|
||||
await plugins.smartfile.memory.toFs(emailContent, filePath);
|
||||
|
||||
// Also save delivery info
|
||||
const infoFileName = `${Date.now()}_${this.email.from}_to_${this.email.to[0]}_info.tson`;
|
||||
const infoFileName = `${Date.now()}_${this.email.from}_to_${this.email.to[0]}_info.json`;
|
||||
const infoPath = plugins.path.join(paths.sentEmailsDir, infoFileName);
|
||||
await plugins.smartfile.memory.toFs(JSON.stringify(this.deliveryInfo, null, 2), infoPath);
|
||||
|
||||
@@ -428,7 +428,7 @@ export class EmailSendJob {
|
||||
await plugins.smartfile.memory.toFs(emailContent, filePath);
|
||||
|
||||
// Also save delivery info with error details
|
||||
const infoFileName = `${Date.now()}_${this.email.from}_to_${this.email.to[0]}_error.tson`;
|
||||
const infoFileName = `${Date.now()}_${this.email.from}_to_${this.email.to[0]}_error.json`;
|
||||
const infoPath = plugins.path.join(paths.failedEmailsDir, infoFileName);
|
||||
await plugins.smartfile.memory.toFs(JSON.stringify(this.deliveryInfo, null, 2), infoPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user