This commit is contained in:
2025-05-26 04:09:29 +00:00
parent 84196f9b13
commit 5a45d6cd45
19 changed files with 2691 additions and 4472 deletions

View File

@@ -205,7 +205,8 @@ tap.test('CCMD-02: MAIL FROM - should handle AUTH parameter if authenticated', a
const authClient = createSmtpClient({
host: authServer.hostname,
port: authServer.port,
secure: true, // Use TLS since auth requires it
secure: false, // Use STARTTLS instead of direct TLS
requireTLS: true, // Require TLS upgrade
tls: {
rejectUnauthorized: false // Accept self-signed cert for testing
},
@@ -213,23 +214,29 @@ tap.test('CCMD-02: MAIL FROM - should handle AUTH parameter if authenticated', a
user: 'testuser',
pass: 'testpass'
},
connectionTimeout: 5000
connectionTimeout: 5000,
debug: true
});
const email = new Email({
from: 'authenticated@example.com',
to: 'recipient@example.com',
subject: 'AUTH Parameter Test',
text: 'Sent with authentication'
});
const result = await authClient.sendMail(email);
expect(result.success).toBeTrue();
console.log('✅ AUTH parameter handled in MAIL FROM');
await authClient.close();
await stopTestServer(authServer);
try {
const email = new Email({
from: 'authenticated@example.com',
to: 'recipient@example.com',
subject: 'AUTH Parameter Test',
text: 'Sent with authentication'
});
const result = await authClient.sendMail(email);
expect(result.success).toBeTrue();
console.log('✅ AUTH parameter handled in MAIL FROM');
} catch (error) {
console.error('AUTH test error:', error);
throw error;
} finally {
await authClient.close();
await stopTestServer(authServer);
}
});
tap.test('CCMD-02: MAIL FROM - should handle very long email addresses', async () => {