update
This commit is contained in:
@@ -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 () => {
|
||||
|
Reference in New Issue
Block a user