diff --git a/backend/services/mail/mail-service/src/main/kotlin/at/mocode/mail/service/MailServiceApplication.kt b/backend/services/mail/mail-service/src/main/kotlin/at/mocode/mail/service/MailServiceApplication.kt index 4b84013f..25e6314f 100644 --- a/backend/services/mail/mail-service/src/main/kotlin/at/mocode/mail/service/MailServiceApplication.kt +++ b/backend/services/mail/mail-service/src/main/kotlin/at/mocode/mail/service/MailServiceApplication.kt @@ -33,14 +33,19 @@ class MailServiceApplication(private val env: Environment) { val springPort = env.getProperty("server.port", "8083") val appName = env.getProperty("spring.application.name", "mail-service") - val mailHost = env.getProperty("spring.mail.host", "N/A") - val mailPort = env.getProperty("spring.mail.port", "N/A") - val mailUser = env.getProperty("spring.mail.username", "N/A") + val mailHost = env.getProperty("spring.mail.host") + val mailPort = env.getProperty("spring.mail.port") + val mailUser = env.getProperty("spring.mail.username") + val mailPass = env.getProperty("spring.mail.password")?.take(3) + "***" + + val envHost = System.getenv("SPRING_MAIL_HOST") + val envPort = System.getenv("SPRING_MAIL_PORT") log.info("----------------------------------------------------------") log.info("Application '{}' is running!", appName) log.info("Spring Management Port: {}", springPort) - log.info("SMTP Config (from Env): host={}, port={}, user={}", mailHost, mailPort, mailUser) + log.info("SMTP Config (Resolved): host={}, port={}, user={}, pass={}", mailHost, mailPort, mailUser, mailPass) + log.info("SMTP Config (Raw Env): host={}, port={}", envHost, envPort) log.info("Profiles: {}", env.activeProfiles.joinToString(", ")) log.info("----------------------------------------------------------") } diff --git a/backend/services/mail/mail-service/src/main/resources/application.yaml b/backend/services/mail/mail-service/src/main/resources/application.yaml index 1f55509c..184a4dc5 100644 --- a/backend/services/mail/mail-service/src/main/resources/application.yaml +++ b/backend/services/mail/mail-service/src/main/resources/application.yaml @@ -11,16 +11,16 @@ spring: ddl-auto: update show-sql: true mail: - host: smtp.world4you.com - port: 587 - username: online-nennen@mo-code.at - password: Mogi#2reiten + host: ${SPRING_MAIL_HOST:smtp.world4you.com} + port: ${SPRING_MAIL_PORT:587} + username: ${SPRING_MAIL_USERNAME:online-nennen@mo-code.at} + password: ${SPRING_MAIL_PASSWORD:Mogi#2reiten} properties: mail: smtp: - auth: true + auth: ${SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH:true} starttls: - enable: true + enable: ${SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE:true} cloud: consul: diff --git a/frontend/shells/meldestelle-web/src/wasmJsMain/kotlin/at/mocode/frontend/shell/web/WebMainScreen.kt b/frontend/shells/meldestelle-web/src/wasmJsMain/kotlin/at/mocode/frontend/shell/web/WebMainScreen.kt index 8c9ea2c7..24e54134 100644 --- a/frontend/shells/meldestelle-web/src/wasmJsMain/kotlin/at/mocode/frontend/shell/web/WebMainScreen.kt +++ b/frontend/shells/meldestelle-web/src/wasmJsMain/kotlin/at/mocode/frontend/shell/web/WebMainScreen.kt @@ -105,16 +105,15 @@ fun MainAppContent() { scope.launch { println("Starte Senden der Nennung für ${payload.vorname} ${payload.nachname}...") val result = nennungRepository.sendeNennung(screen.turnierId.toString(), payload) - if (result.isSuccess) { - println("Nennung erfolgreich gesendet. Rufe onResult(true) auf.") - onResult(true, null) + val success = result.isSuccess + val error = result.exceptionOrNull()?.message + + println("API Result im MainScreen: success=$success, error=$error") + onResult(success, error) + + if (success) { println("Wechsle zum Erfolgsscreen für ${payload.email}") currentScreen = WebScreen.Erfolg(payload.email) - } else { - val error = result.exceptionOrNull()?.message - println("Nennung fehlgeschlagen: $error. Rufe onResult(false) auf.") - onResult(false, error) - println("Fehler beim Senden der Nennung: $error") } } }, @@ -130,7 +129,7 @@ fun MainAppContent() { // Dezentraler Versions-Marker in der unteren rechten Ecke Box(modifier = Modifier.fillMaxSize().padding(8.dp), contentAlignment = Alignment.BottomEnd) { Text( - text = "v2026-04-23.37 - SMTP HARD-CODED", + text = "v2026-04-23.38 - SMTP & UI FINAL FORCE", style = MaterialTheme.typography.labelSmall, color = Color.LightGray.copy(alpha = 0.5f) )