Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Email notification for share, even when activity settings is disabled #33205

Open
5 of 8 tasks
EngelPika32 opened this issue Jul 11, 2022 · 13 comments
Open
5 of 8 tasks

Comments

@EngelPika32
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Similar to what was described in this ancient issue: #11216

A friend shared a folder, and I received an email.
My settings under settings/user/activity for "A file or folder has been shared" are disabled for email (and push). Hence I shouldn't have received an email. – With a link to accept the share, although I've (under settings/user/sharing) "Allow shares by default" enabled. The share got accepted automatically (or at least, it appeared in my folders without me using the accept link from the mail).

Oh, and late on my friend added a note to the share, which caused a second mail; which is unwanted as well.

Steps to reproduce

  1. Admin settings: EMail configured; Sharing via mail allowed.
  2. User1 settings (activity): disable EMail for "A file or folder has been shared"
  3. User2: share a folder (or file) by entering the Username, and selecting the user from the search results/suggestions
  4. User1 receives an Email (with a link to accept the share)

Expected behavior

No EMail, if the user (receiving a share) doesn't want EMails about this. This can get quite spammy if you receive a lot of shares.

Installation method

Official Docker image

Operating system

Other

PHP engine version

PHP 8.1

Web server

Other

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

Don't have access to that right now.

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

Sharing via email was just recently enabled on our instance. Hence I do not know if this bug is new. But seeing the old issue with a relatively new comment about it, makes me confident, that this isn't new.

@EngelPika32 EngelPika32 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jul 11, 2022
@Mer0me
Copy link

Mer0me commented Sep 13, 2022

Bug is still present on v24.0.5.
There is no way to prevent sending of sharing emails.

@Ododo
Copy link

Ododo commented Nov 11, 2022

Ok so it seems this option of config.php can be set to false as workaround:


 * Set to false to stop sending a mail when users receive a share
 */
'sharing.enable_share_mail' => true,

It triggers an email from within the core Mailer.php, which seems redundant with the activity app own mailer.

Note that turning this option to false, does not prevent you to create links or to actually share a file to an email.
I think the option name is misleading.

also see: #26183

@szaimen

This comment was marked as resolved.

@Mer0me

This comment was marked as resolved.

@datenangebot
Copy link

This bug is still present, tested with 24.0.9.
You even get mail if you deactivated to receive mails.

I see two approaches:

  1. We should respect the activity settings for sending mails in general. (
    if ($this->config->getSystemValueBool('sharing.enable_share_mail', true)
    )
  2. The description of the activities settings should make clear what it effects.

@szaimen You asked for feedback here (via label), do you need more information about that?

@crzp
Copy link

crzp commented May 22, 2023

This bug is still present in 24.0.12 and very annoying.
Please make it toggleable!

Btw,
it also effects creating, deleting, changing files in a shared folder.
It creates so much spam for all users who a part of the shared folder.

@juliusknorr
Copy link
Member

juliusknorr commented Aug 1, 2023

@nextcloud/designers We currently have two possible mails when a file is shared to a user

  • A mail sent by the files_sharing app to the user which can only be disabled globally
  • A mail sent by the activity app (might also be part of a grouped activity mail) which has a per user setting
    • the activity mail setting covers more cases like unshare, share to groups

Screenshot 2023-08-01 at 09 57 24

I'd say it makes sense to check the setting of the activity app and not sending out any email notification then, would you agree?

Then we could just add a check for this in

if ($this->config->getSystemValueBool('sharing.enable_share_mail', true)

One thing worth to mention is that The activity option is disabled by default, so we may need to switch this?

Also cc @artonge and @miaulalala for the activity app

@jancborchardt
Copy link
Member

A mail sent by the files_sharing app to the user which can only be disabled globally

@juliushaertl what info would this contain?

But generally yes, I would agree with your assessment to check the setting of the activity app. If people say no mail regarding that we should honor that.

One thing worth to mention is that The activity option is disabled by default, so we may need to switch this?

Yes, probably also makes sense if currently the de-facto default is getting an email anyway.

@miaulalala miaulalala added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 28, 2023
@juliusknorr
Copy link
Member

juliusknorr commented Oct 17, 2023

@juliusknorr
Copy link
Member

juliusknorr commented Oct 17, 2023

@jancborchardt Those are the two mails:

  1. Email by the files sharing app (may contain share note)
  • Controlled by the config.php option sharing.enable_share_mail, enabled by default, one individual mail for each share
  • Screenshot 2023-10-17 at 09 28 43
  1. Email by the activity app
  • Controlled by admin defaults with user setting overwrite in activity settings UI, disabled by default
  • List of activities that might contain other entries as well
  • Might happen immediately or later depending on the user config
  • Screenshot 2023-10-17 at 09 28 54

Thinking more about it I'm not entirely sure we should couple those settings.

@miaulalala
Copy link
Contributor

Thinking more about it I'm not entirely sure we should couple those settings.

I agree. But we could make the sharing app a per-user setting. That would work nicely and we can store that in oc_preferences.

@max-nextcloud
Copy link
Contributor

I agree. But we could make the sharing app a per-user setting. That would work nicely and we can store that in oc_preferences.

@jancborchardt - What do you say? Would that be the way to go?

@jancborchardt
Copy link
Member

@miaulalala @max-nextcloud yeah, that actually makes a lot of sense, that should be personal preference. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests