Calendar Appointment Error "Could not book the appointment. Please try again later or contact the organizer."

Nextcloud version (eg, 20.0.5): 23.0.5
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.29
PHP version (eg, 7.4): 7.4.29

The issue you are facing:
I receive the error message “Could not book the appointment. Please try again later or contact the organizer.” when attempting to book an appointment using the calendar appointment function.

I disabled the other Appointment app thinking they may be conflicting, however the error persists.

I tried different emails, names, time slots, etc. All fail.

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

Steps to replicate it:
I click on the user’s profile, click on the icon for appointments under the user’s avatar, I click on a time slot, it auto fills my name and email, I click on Book The Appointment button, then the error appears.

The output of your Nextcloud log in Admin > Logging:

I only included the Calendar error:

OCA\Calendar\Exception\ServiceException: Could not send mail: Expected response code 354 but got code "554", with message "554 5.5.1 Error: no valid recipients "

    /var/www/html/nextcloud/apps/calendar/lib/Service/Appointments/BookingService.php - line 154:

    OCA\Calendar\Service\Appointments\MailService->sendConfirmationEmail()

    /var/www/html/nextcloud/apps/calendar/lib/Controller/BookingController.php - line 185:

    OCA\Calendar\Service\Appointments\BookingService->book()

    /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:

    OCA\Calendar\Controller\BookingController->bookSlot()

    /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:

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

    /var/www/html/nextcloud/lib/private/AppFramework/App.php - line 157:

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

    /var/www/html/nextcloud/lib/private/Route/Router.php - line 302:

    OC\AppFramework\App::main()

    /var/www/html/nextcloud/lib/base.php - line 1008:

    OC\Route\Router->match()

    /var/www/html/nextcloud/index.php - line 36:

    OC::handleRequest()

Caused by Swift_TransportException: Expected response code 354 but got code "554", with message "554 5.5.1 Error: no valid recipients "

    /var/www/html/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php - line 344:

    Swift_Transport_AbstractSmtpTransport->assertResponseCode()

    /var/www/html/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - line 305:

    Swift_Transport_AbstractSmtpTransport->executeCommand()

    /var/www/html/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php - line 392:

    Swift_Transport_EsmtpTransport->executeCommand()

    /var/www/html/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php - line 499:

    Swift_Transport_AbstractSmtpTransport->doDataCommand()

    /var/www/html/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php - line 518:

    Swift_Transport_AbstractSmtpTransport->doMailTransaction()

    /var/www/html/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php - line 206:

    Swift_Transport_AbstractSmtpTransport->sendTo()

    /var/www/html/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php - line 71:

    Swift_Transport_AbstractSmtpTransport->send()

    /var/www/html/nextcloud/lib/private/Mail/Mailer.php - line 204:

    Swift_Mailer->send()

    /var/www/html/nextcloud/apps/calendar/lib/Service/Appointments/MailService.php - line 133:

    OC\Mail\Mailer->send()

    /var/www/html/nextcloud/apps/calendar/lib/Service/Appointments/BookingService.php - line 154:

    OCA\Calendar\Service\Appointments\MailService->sendConfirmationEmail()

    /var/www/html/nextcloud/apps/calendar/lib/Controller/BookingController.php - line 185:

    OCA\Calendar\Service\Appointments\BookingService->book()

    /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:

    OCA\Calendar\Controller\BookingController->bookSlot()

    /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:

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

    /var/www/html/nextcloud/lib/private/AppFramework/App.php - line 157:

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

    /var/www/html/nextcloud/lib/private/Route/Router.php - line 302:

    OC\AppFramework\App::main()

    /var/www/html/nextcloud/lib/base.php - line 1008:

    OC\Route\Router->match()

    /var/www/html/nextcloud/index.php - line 36:

    OC::handleRequest()

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

<?php
$CONFIG = array (
  'instanceid' => 'oc78969uz4yi',
  'passwordsalt' => 'NOTREAL',
  'secret' => 'NOTREAL',
  'trusted_domains' => 
  array (
    0 => '192.168.100.33',
    1 => 'nc.edmontonnotaryservices.ca',
  ),
  'trusted_proxies' => 
  array (
    0 => '192.168.100.34',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '23.0.5.1',
  'overwrite.cli.url' => 'https://nc.NOTREAL.ca/nextcloud',
  'overwritehost' => 'nc.edmontonnotaryservices.ca',
  'overwriteprotocol' => 'https',
  'overwritecondaddr' => '^192\\.168\\.100\\.34$',
  'overwritewebroot' => '/nextcloud',
  'dbname' => 'NOTREAL',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'NOTREAL',
  'dbpassword' => 'NOTREAL',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'edmontonnotaryservices.ca',
  'app_install_overwrite' => 
  array (
    0 => 'ojsxc',
  ),
  'maintenance' => false,
  'loglevel' => 0,
  'theme' => '',
  'has_rebuilt_cache' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
  ),
  'default_phone_region' => 'CA',
  'updater.release.channel' => 'stable',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.NOTREAL.com',
  'mail_smtpname' => 'info@NOTREAL.COM',
  'mail_smtppassword' => 'NOTREAL',
  'mail_smtpport' => '465',
);

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

[Thu Jun 09 06:25:11.230536 2022] [mpm_prefork:notice] [pid 2450] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Jun 09 06:25:11.230650 2022] [core:notice] [pid 2450] AH00094: Command line: '/usr/sbin/apache2'

Logging at warning level to file: /tmp/coolwsd.OEUfXQWus8/coolwsd.log
[Thu Jun 09 09:23:22.504123 2022] [php7:warn] [pid 82173] [client 192.168.100.34:34230] PHP Warning:  POST Content-Length of 20062765 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
[Thu Jun 09 09:23:22.685609 2022] [php7:warn] [pid 82172] [client 192.168.100.34:34232] PHP Warning:  POST Content-Length of 9117469 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Security: coolforkit incorrect user-name, other than 'cool'
Init vcl
preload: merged ucpchelp1 msforms vbaobj pcr vbaswobj sw animcore hwp chartcore solver sc wpftcalc ucpcmis1 wpftdraw sd svgfilter graphicfilter wpftimpress sdfilt sm pdffilter PresentationMinimizer protocolhandler ucpdav1 wpftwriter msword writerfilter t602filter binaryurp uuresolver scd chartcontroller ldapbe2 dba sdbt deploymentgui migrationoo2 migrationoo3 sdd embobj emboleobj log expwrap storagefd textconversiondlgs smd mozbootstrap oox scfilt slideshow proxyfac dlgprov dbaxml calc dbase flat writer reflection bootstrap introspection invocation invocadapt namingservice stocservices cached1 ucppkg1 swd cui bib scn scriptframe dbpool2 xmlsecurity analysis date pricing xsec_xmlsec pdfimport mysql_jdbc
Disabled: ucpftp1 rptxml dbu rptui rpt mork odbc sdbc2 cmdmail PresenterScreen abp dbp 
Allowlisted languages: de_DE el en_GB en_US es_ES fr_FR hu it nl pt_BR pt_PT ru 
Preloading dictionaries: de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB nl_BE pt_PT es_ES 
Preloading thesauri: de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB nl_BE pt_PT es_ES 
Preload icons
Preload languages
Preload fonts
Preload config
Ready to accept connections on port 9983.

Security: coolmount incorrect user-name, other than 'cool'
Aborting.

*** Repeats 13 times ***

Security: coolmount incorrect user-name, other than 'cool'
Aborting.
[Thu Jun 09 09:52:21.293591 2022] [access_compat:error] [pid 83393] [client 192.168.100.34:35832] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
cat: /sys/class/net/eth0/speed: Invalid argument
cat: /sys/class/net/eth0/duplex: Invalid argument
[Thu Jun 09 10:20:23.292064 2022] [access_compat:error] [pid 84651] [client 192.168.100.34:38458] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
Security: coolmount incorrect user-name, other than 'cool'
Aborting.

*** Repeats 9 times ***

Security: coolmount incorrect user-name, other than 'cool'
Aborting.
[Thu Jun 09 10:51:38.453467 2022] [php7:warn] [pid 86258] [client 192.168.100.34:40476] PHP Warning:  POST Content-Length of 9117469 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
[Thu Jun 09 10:51:41.386471 2022] [php7:warn] [pid 85858] [client 192.168.100.34:40490] PHP Warning:  POST Content-Length of 20062765 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Security: coolmount incorrect user-name, other than 'cool'
Aborting.

*** Repeats 10 times ***

Security: coolmount incorrect user-name, other than 'cool'
Aborting.
[Thu Jun 09 11:53:55.378095 2022] [php7:error] [pid 88695] [client 192.168.100.34:44768] PHP Fatal error:  require(): Failed opening required '/var/www/html/nextcloud/apps/mail/vendor/composer/../amphp/amp/lib/functions.php' (include_path='/var/www/html/nextcloud/3rdparty/pear/archive_tar:/var/www/html/nextcloud/3rdparty/pear/console_getopt:/var/www/html/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/html/nextcloud/3rdparty/pear/pear_exception:/var/www/html/nextcloud/apps') in /var/www/html/nextcloud/apps/mail/vendor/composer/autoload_real.php on line 55
[Thu Jun 09 12:01:08.511121 2022] [php7:warn] [pid 89813] [client 192.168.100.34:45842] PHP Warning:  POST Content-Length of 20062765 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Security: coolmount incorrect user-name, other than 'cool'
Aborting.
Security: coolmount incorrect user-name, other than 'cool'
Aborting.
Security: coolmount incorrect user-name, other than 'cool'
Aborting.
[Thu Jun 09 12:06:18.091737 2022] [php7:error] [pid 90314] [client 192.168.100.34:46852] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1040] Too many connections in /var/www/html/nextcloud/lib/private/DB/Connection.php:87\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(237): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(361): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(126): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/priva in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 87

*** Repeats 113 times ***

[Thu Jun 09 12:06:23.942633 2022] [php7:error] [pid 89977] [client 192.168.100.34:46614] PHP Fatal error:  Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1040] Too many connections in /var/www/html/nextcloud/lib/private/DB/Connection.php:87\nStack trace:\n#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\\DB\\Connection->connect()\n#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/html/nextcloud/lib/private/DB/Connection.php(237): Doctrine\\DBAL\\Connection->executeQuery()\n#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\\DB\\Connection->executeQuery()\n#4 /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/html/nextcloud/lib/private/AppConfig.php(361): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 /var/www/html/nextcloud/lib/private/AppConfig.php(126): OC\\AppConfig->loadConfigValues()\n#7 /var/www/html/nextcloud/lib/priva in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 87