feat: Enhance useSendTestEmail hook to support testing without saving

- Add support for optional email configuration parameter
- Implement improved error handling with detailed messages
- Add internationalization support for all user feedback
- Return appropriate error information for better UX
- Maintain backward compatibility with existing code
This commit is contained in:
mohadeseh safari committed 2025-05-16 19:45:24 -04:00
1 parent 083c395f10
commit dbcdb24da6
4 files changed
+56 -14

No files matched your search

+14 -10
View File
@@ -112,15 +112,21 @@
"settingsFailedToAddDemoMonitors": "Failed to add demo monitors",
"settingsMonitorsDeleted": "Successfully deleted all monitors",
"settingsFailedToDeleteMonitors": "Failed to delete all monitors",
"settingsEmail": "Email settings",
"settingsEmailDescription": "Configure email settings",
"settingsEmailHost": "Email host - Hostname or IP address of the SMTP server",
"settingsEmailPort": "Email port - Port to connect to",
"settingsEmailAddress": "Email address - Used for authentication",
"settingsEmailPassword": "Email password - Password for authentication",
"settingsEmailUser": "Email user - Username for authentication, overrides email address if specified",
"settingsEmail": "Email",
"settingsEmailDescription": "Configure the email settings for your system. This is used to send notifications and alerts.",
"settingsEmailHost": "Email host",
"settingsEmailPort": "Email port",
"settingsEmailUser": "Email user",
"settingsEmailAddress": "Email address",
"settingsEmailPassword": "Email password",
"settingsEmailConnectionHost": "Email connection host",
"settingsTestEmail": "Send test e-mail",
"settingsTestEmailSuccess": "Test email sent successfully",
"settingsTestEmailFailed": "Failed to send test email",
"settingsTestEmailFailedWithReason": "Failed to send test email: {{reason}}",
"settingsTestEmailUnknownError": "Unknown error",
"settingsEmailRequiredFields": "Email host and port are required",
"settingsEmailFieldResetLabel": "Password is set. Click Reset to change it.",
"settingsEmailConnectionHost": "Email connection host - Hostname to use in the HELO/EHLO greeting",
"backendUnreachable": "Server Connection Error",
"backendUnreachableMessage": "We're unable to connect to the server. Please check your internet connection or verify your deployment configuration if the problem persists.",
"backendUnreachableError": "Cannot connect to the server. Please try again later.",
@@ -522,8 +528,6 @@
"logOut": "Log out"
},
"navControls": "Controls",
"statusBreadCrumbsStatusPages": "Status Pages",
"statusBreadCrumbsDetails": "Details",
"incidentsPageTitle": "Incidents",
"passwordPanel": {
"passwordChangedSuccess": "Your password was changed successfully.",