Signed-off-by: Joas Schilling <coding@schilljs.com>
*/
'sharing.force_share_accept' => false,
+/**
+ * Set to false to stop sending a mail when users receive a share
+ */
+'sharing.enable_share_mail' => true,
+
/**
* All other configuration options
$this->dispatcher->dispatchTyped(new Share\Events\ShareCreatedEvent($share));
- if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
+ if ($this->config->getSystemValueBool('sharing.enable_share_mail', true)
+ && $share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
$mailSend = $share->getMailSend();
if($mailSend === true) {
$user = $this->userManager->get($share->getSharedWith());