Implement form validation and error handling for email sending in Register class
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user