Share Files via Email with Non-Users Without Creating Guest Accounts?

Hello everyone,

I have a question regarding file sharing in Nextcloud.

Is it possible to share files with external email addresses (users who don’t have a Nextcloud account) without having to create guest accounts for them?

I would like to simply share a file or resource via email with someone outside of the Nextcloud environment.

Any guidance on how to do this, or if it’s even possible, would be greatly appreciated.

Thanks in advance! :bouquet:

Guest account is required when you want the others being able to use a desktop client.

When you just want to share via web-interface, just create a share link:
https://docs.nextcloud.com/server/latest/user_manual/en/files/sharing.html#public-link-shares

2 Likes

In the sharing options you must use after insert the email the correct option with the letter symbol.

An e-mail with the link will then be sent to the e-mail address. Personally, I don’t like this very much as the look of the email is not really nice. I prefer to create a link straight away and send the email manually. In terms of security, it doesn’t matter as the link is not linked to an e-mail account, but is only sent by e-mail. The Guests app exists precisely for the e-mail account link.

2 Likes

Mmm, then I think there might be something wrong. I’ve configured the SMTP server, and the test email arrives successfully:

However, when I try to share a file via email, it doesn’t arrive. The email doesn’t show up in my spam folder either, and there are no error messages appearing :thinking:

Have you click on the field with the e-mail? Is there something in the logs? Maybe use browser dev tools (F12) for network analysis.

Yes, I’ve added this to my config.php to enable debugging:

'mail_smtpdebug' => '4',

This is what the mail configuration section looks like:

  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'cloud',
  'mail_domain' => '**********.com',
  'mail_smtphost' => 'smtp.********.com',
  'mail_smtpdebug' => '4',
  'mail_smtpport' => '25',
  'mail_smtpstreamoptions' =>
  array (
    'ssl' =>
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),

What’s curious is that when I share a file, no message appears in the log, neither error nor success.

However, when I try to re-share the file, the log shows that it can’t be shared because it’s already shared:

{"reqId":"LOl5wEZZ1K2MGFbVj7oV","level":3,"time":"2024-10-24T11:36:32+00:00","remoteAddr":"*******","user":"mb19","app":"files_sharing","method":"POST","url":"/ocs/v2.php/apps/files_sharing/api/v1/shares","message":"No se pudo compartir prueba porque este elemento ya est\u00e1 compartido con la cuenta **********@gmail.com","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64)

The English translation would be → “prueba” could not be shared because this item is already shared with the account **********@gmail.com

In any case, the recipient does not receive any mail.

I have used the developer tools, and there is actually an error :thinking:

Thanks for the hint

Is your mail server working at all? Are you using SSL or not? I think port 25 does not match SSL.

Yes, sorry, I had been testing the configuration when I added that part of config.php

It’s actually configured like this, and it does send test emails without any problem.

But it still doesn’t send emails when sharing files and continues to notify that it has already been shared.


I also do not receive emails when sharing a file via an email address, although the mail server is configured correctly and regular notifications come without problems

1 Like

I have now also tried it. I also have the same problem with my Nextcloud 30.0.1. Unfortunately, I can’t test it on my test installations. Maybe a bug.

Yes, I think it’s a bug. I tried installing an earlier version with the same configuration, and that one works.

:x: Not working :

 version: 30.0.1.2

:white_check_mark: Working:

 version: 29.0.8.1

Received email:

1 Like

You can use the app “Configurable Share Links”. It lets you create a custom share for either files or folders. It lets you specify what those with the link can do. Can they edit, read-only, or even make a folder an upload folder. you can also set share expirations. I have been using this app for almost 3 years. It is great.

So the sharing works, it’s just about the mail?

Have you reported the bug?

There is an issue and hopefully it will be fixed with Nextoud 30.0.2 see another thread.

Having a link for others to follow up whould be nice in this case… :wink:

Problem is solved in Nextcloud 30.0.2.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.