feat: add debug logging for SMTP configuration and detailed mail delivery status
Build and Push Multi-Platform Images / build-and-push (push) Failing after 34s

This commit is contained in:
2026-05-06 19:48:29 +02:00
parent 443ab765c9
commit a000e0f5c6
16 changed files with 431 additions and 5 deletions
@@ -18,6 +18,7 @@ import { createReadStream } from 'fs';
import { InboxService } from './inbox.service';
import { InboxPostprocessorService } from '../inbox-postprocessor/inbox-postprocessor.service';
import { BarcodeScannerService } from '../barcode/barcode-scanner.service';
import { UserSettingsService } from '../user-settings/user-settings.service';
import { RequirePermissions } from '../auth/permissions.decorator';
import { Permission } from '../auth/permissions.enum';
@@ -28,6 +29,7 @@ export class InboxController {
private readonly inboxService: InboxService,
private readonly postprocessor: InboxPostprocessorService,
private readonly barcodeScanner: BarcodeScannerService,
private readonly userSettingsService: UserSettingsService,
) {}
@Get()
@@ -205,6 +207,10 @@ export class InboxController {
@Request() req: any,
): Promise<void> {
const preferredUsername: string | null = req.user?.preferredUsername ?? null;
await this.inboxService.sendAsEmail(id, preferredUsername, body);
const smtpOverride = await this.userSettingsService.getSmtpConfig(req.user.userId);
await this.inboxService.sendAsEmail(id, preferredUsername, {
...body,
smtpOverride: smtpOverride ?? undefined,
});
}
}
@@ -10,6 +10,7 @@ import { InboxMigrationService } from './inbox-migration.service';
import { BarcodeModule } from '../barcode/barcode.module';
import { InboxPostprocessorModule } from '../inbox-postprocessor/inbox-postprocessor.module';
import { PostprocessingModule } from '../postprocessing/postprocessing.module';
import { UserSettingsModule } from '../user-settings/user-settings.module';
@Module({
imports: [
@@ -17,6 +18,7 @@ import { PostprocessingModule } from '../postprocessing/postprocessing.module';
BarcodeModule,
InboxPostprocessorModule,
PostprocessingModule,
UserSettingsModule,
],
controllers: [InboxController, ClientsController],
providers: [InboxService, InboxMigrationService],
@@ -274,6 +274,7 @@ export class InboxService {
body: string;
html?: string;
segments: { pages: number[]; filename: string }[];
smtpOverride?: { host: string; port: number; secure: boolean; user: string; pass: string; from: string };
},
): Promise<void> {
const { doc, pdfPath } = await this.resolveDocument(id, preferredUsername);
@@ -294,6 +295,7 @@ export class InboxService {
body: opts.body,
html: opts.html,
attachments,
smtpOverride: opts.smtpOverride,
});
}
}