The SMTP-log integration tests currently create messages using PostMessageRequest and immediately query their SMTP logs:
- GetMessageSmtpLogRequest.test.ts
- GetInboxMessageSmtpLogRequest.test.ts
Messages created through the HTTP API do not pass through SMTP. For these messages, the API returns a successful response with an empty string:
{ "log": "" }
Both tests expect result.log to be an array, so they fail:
Expected: true
Received: false`
expect(Array.isArray(result?.log)).toBe(true);
For a message genuinely delivered through SMTP, the API returns the expected array:
{
"log": [
{
"log": "Connection from: 192.0.2.1",
"time": "0",
"event": "SOCKET_OPEN"
},
{
"time": "69",
"event": "TLS_ACTIVE"
},
{
"time": "174",
"event": "SOCKET_CLOSED"
}
]
}
This also shows that individual SMTP-log entries do not always include the inner log property. The current SDK model incorrectly declares it as required:
export class EmailLogEntity {
log: string;
time: string;
event: string;
}
Expected behavior
The integration tests should query a known message that was delivered through SMTP, and the SDK type should accurately represent entries where the textual log value is absent.
The SMTP-log integration tests currently create messages using PostMessageRequest and immediately query their SMTP logs:
Messages created through the HTTP API do not pass through SMTP. For these messages, the API returns a successful response with an empty string:
{ "log": "" }Both tests expect result.log to be an array, so they fail:
For a message genuinely delivered through SMTP, the API returns the expected array:
This also shows that individual SMTP-log entries do not always include the inner log property. The current SDK model incorrectly declares it as required:
Expected behavior
The integration tests should query a known message that was delivered through SMTP, and the SDK type should accurately represent entries where the textual log value is absent.