Error creating the share: Failed to send share by mail

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Hello, this happened to me last time, i didnt bother fixing because i was migrating servers anyway, i was thinking fresh install and carry on, much to my surprise same error again, i have no ide what to do, can you please help?!

Nextcloud version _24.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. create a share
  2. enter email address
  3. hit enter

The output of your Nextcloud log in Admin > Logging:

Error	no app in context	OCP\HintException: Failed to send share by mail
/home/example.com/domains/cloud.example.com/public_html/apps/sharebymail/lib/ShareByMailProvider.php - line 197:

OCA\ShareByMail\ShareByMailProvider->createMailShare()

/home/example.com/domains/cloud.example.com/public_html/lib/private/Share20/Manager.php - line 818:

OCA\ShareByMail\ShareByMailProvider->create()

/home/example.com/domains/cloud.example.com/public_html/apps/files_sharing/lib/Controller/ShareAPIController.php - line 678:

OC\Share20\Manager->createShare()

/home/example.com/domains/cloud.example.com/public_html/lib/private/AppFramework/Http/Dispatcher.php - line 225:

OCA\Files_Sharing\Controller\ShareAPIController->createShare()

/home/example.com/domains/cloud.example.com/public_html/lib/private/AppFramework/Http/Dispatcher.php - line 133:

OC\AppFramework\Http\Dispatcher->executeController()

/home/example.com/domains/cloud.example.com/public_html/lib/private/AppFramework/App.php - line 172:

OC\AppFramework\Http\Dispatcher->dispatch()

/home/example.com/domains/cloud.example.com/public_html/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/home/example.com/domains/cloud.example.com/public_html/ocs/v1.php - line 62:

OC\Route\Router->match()

/home/example.com/domains/cloud.example.com/public_html/ocs/v2.php - line 23:

require_once("/home/hostm ... p")

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

PASTE HERE


The output of your Apache/nginx/system log in `/var/log/____`:

PASTE HERE


PASTE HERE

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE