Implement form validation and error handling for email sending in Register class

This commit is contained in:
Torsten Schulz (local)
2026-03-16 22:04:57 +01:00
parent 8ed62b86bc
commit dd8ce88556
2 changed files with 14 additions and 3 deletions

View File

@@ -461,7 +461,12 @@ class Renderer {
$mail->addStringAttachment($attachment['content'], $fileName, 'base64', $attachment['type']);
}
$mail->send();
try {
$mail->send();
} catch (Exception $e) {
error_log('Mailversand fehlgeschlagen: ' . $e->getMessage());
$this->errors[] = 'Die Bestätigungs-Email konnte nicht versendet werden. Bitte versuchen Sie es später erneut oder kontaktieren Sie uns direkt.';
}
}
protected function connectToImap($folder = ''): bool {