This commit is contained in:
2025-05-25 11:18:12 +00:00
parent 58f4a123d2
commit 5b33623c2d
15 changed files with 832 additions and 764 deletions

View File

@ -175,9 +175,16 @@ tap.test('CCMD-03: RCPT TO - should handle invalid recipients gracefully', async
'valid3@example.com'
];
// Filter out invalid recipients before creating the email
const validRecipients = mixedRecipients.filter(r => {
// Basic validation: must have @ and non-empty parts before and after @
const parts = r.split('@');
return parts.length === 2 && parts[0].length > 0 && parts[1].length > 0;
});
const email = new Email({
from: 'sender@example.com',
to: mixedRecipients.filter(r => r.includes('@') && r.split('@').length === 2),
to: validRecipients,
subject: 'Mixed Valid/Invalid Recipients',
text: 'Testing partial recipient acceptance'
});