fix(07): UAT fixes — SMTP test email, DKV routing, Exchange domain field
- SMTP: add test-to field, send real email via sendMail() instead of verify() - SMTP: fix no_auth warning shown as error for open-relay servers - DKV: register dkv-fleet in MODULE_REGISTRY (fixes "Modul nicht gefunden") - DKV: add dynamic [category]/[moduleSlug]/settings + vehicles sub-routes - DKV: settings/vehicles links use useParams for consistent URLs - DKV: add gear icon settings link to module main page - DKV: rename module to "DKV-Rechnung" in seed + translations - DKV: add optional domain field for Exchange (WebCredentials 3rd arg) - DKV: hide IMAP-only fields (Port/Verschlüsselung/Ordner) when Exchange selected - DKV: hide Exchange-only field (Domain) when IMAP selected - Prisma: add domain column to DkvModuleConfig Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,4 +44,8 @@ export class SmtpConfigDto {
|
||||
|
||||
@IsEmail()
|
||||
fromAddress!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
testTo?: string;
|
||||
}
|
||||
|
||||
@@ -138,8 +138,6 @@ export class SettingsService {
|
||||
}
|
||||
}
|
||||
|
||||
const hasAuth = !!(username && password);
|
||||
|
||||
try {
|
||||
const transport = nodemailer.createTransport({
|
||||
host: dto.host,
|
||||
@@ -154,13 +152,17 @@ export class SettingsService {
|
||||
: undefined,
|
||||
});
|
||||
|
||||
await transport.verify();
|
||||
|
||||
// T-07-16: connection passed but warn when no auth — server reachable but
|
||||
// unauthenticated relay will likely be rejected when actually sending.
|
||||
if (!hasAuth) {
|
||||
return { success: true, warning: 'no_auth' };
|
||||
if (dto.testTo) {
|
||||
await transport.sendMail({
|
||||
from: dto.fromAddress,
|
||||
to: dto.testTo,
|
||||
subject: 'Tessera SMTP-Test',
|
||||
text: 'Diese E-Mail bestätigt, dass die SMTP-Konfiguration in Tessera funktioniert.',
|
||||
});
|
||||
} else {
|
||||
await transport.verify();
|
||||
}
|
||||
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
this.logger.warn(
|
||||
|
||||
Reference in New Issue
Block a user