fix(structure): Unify structure even further
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as plugins from '../ts/plugins.js';
|
||||
import { BounceManager, BounceType, BounceCategory } from '../ts/mail/core/classes.bouncemanager.js';
|
||||
import { Email } from '../ts/mail/core/classes.email.js';
|
||||
|
||||
/**
|
||||
* Test the BounceManager class
|
||||
@ -103,11 +103,11 @@ tap.test('BounceManager - should process SMTP failures correctly', async () => {
|
||||
tap.test('BounceManager - should process bounce emails correctly', async () => {
|
||||
const bounceManager = new BounceManager();
|
||||
|
||||
// Create a mock bounce email as Smartmail
|
||||
const bounceEmail = new plugins.smartmail.Smartmail({
|
||||
// Create a mock bounce email
|
||||
const bounceEmail = new Email({
|
||||
from: 'mailer-daemon@example.com',
|
||||
subject: 'Mail delivery failed: returning message to sender',
|
||||
body: `
|
||||
text: `
|
||||
This message was created automatically by mail delivery software.
|
||||
|
||||
A message that you sent could not be delivered to one or more of its recipients.
|
||||
@ -123,7 +123,7 @@ tap.test('BounceManager - should process bounce emails correctly', async () => {
|
||||
Status: 5.2.2
|
||||
diagnostic-code: smtp; 552 5.2.2 Mailbox full
|
||||
`,
|
||||
creationObjectRef: {}
|
||||
to: 'sender@example.com' // Bounce emails are typically sent back to the original sender
|
||||
});
|
||||
|
||||
const result = await bounceManager.processBounceEmail(bounceEmail);
|
||||
|
Reference in New Issue
Block a user