diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 371c5de5ff..7ed0dc8922 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -176,9 +176,11 @@ public function register(IRegistrationContext $context): void { $context->registerSearchProvider(Provider::class); } - // register mail provider + // TODO: drop condition if nextcloud < 30 is not supported anymore - if (interface_exists(MailProvider::class)) { + // evaluate, if mail provider registration is possible + if (method_exists($context, 'registerMailProvider')) { + // register mail provider $context->registerMailProvider(MailProvider::class); }