1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

throw exception if SMTP is not available

This commit is contained in:
Damodar Lohani 2021-08-31 13:17:58 +05:45
parent dfe8bc6d53
commit ee5745d3ce

View file

@ -645,6 +645,10 @@ App::post('/v1/account/sessions/magic-url')
/** @var Appwrite\Event\Event $events */
/** @var Appwrite\Event\Event $mails */
if(empty(App::getEnv('_APP_SMTP_HOST'))) {
throw new Exception('SMTP Disabled', 503);
}
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::$roles);
$isAppUser = Auth::isAppUser(Authorization::$roles);