mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
(fix): fall back to default template when base template is unreadable
This commit is contained in:
1 file changed
+4
@@ -336,6 +336,10 @@ class Create extends Action
|
||||
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Invalid template path');
|
||||
}
|
||||
$bodyTemplate = APP_CE_CONFIG_DIR . '/locale/templates/' . $smtpBaseTemplate . '.tpl';
|
||||
if (! \is_readable($bodyTemplate)) {
|
||||
$smtpBaseTemplate = 'email-base';
|
||||
$bodyTemplate = APP_CE_CONFIG_DIR . '/locale/templates/email-base.tpl';
|
||||
}
|
||||
|
||||
$body = $locale->getText('emails.invitation.body');
|
||||
$preview = $locale->getText('emails.invitation.preview');
|
||||
|
||||
Reference in new issue
Block a user