Email Exception - Email.php, line 989 - The email set for "to"

Killed one day with this setup. Stuck
Checklist
[x] I have read intro post:
[x] I have read the tutorials, help and searched for similar issues
[x] I provide relevant information about my server (component names and versions, etc.)
[xI provide a copy of my logs and healthcheck
[x] I describe the steps I have taken to trouble shoot the problem
[] I describe the steps on how to reproduce the issue

Test mails working as expected. But no automated mails sending

Fresh OS install, nothing additional installed, beside SSL cert on nginx. Installed latest passbold version version, as per installation guide, using script. No errors during install v2.10.1
PRETTY_NAME=“Debian GNU/Linux 9 (stretch)”
NAME=“Debian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=debian

to troubleshoot I had to install composer from getcomposer (as guided in help files)
then moved composer.phar to /usr/bin/compose

then ran same commands found in other reports here:

  • clear your composer cache
    #composer clear-cache
    Do not run Composer as root/super user!
    Cache directory does not exist (cache-vcs-dir):
    Clearing cache (cache-repo-dir): /root/.cache/composer/repo
    Clearing cache (cache-files-dir): /root/.cache/composer/files
    Clearing cache (cache-dir): /root/.cache/composer
    All caches cleared.

  • clear cakephp cache
    ./bin/cake cache clear_all
    Cleared default cache
    Cleared cake_core cache
    Cleared cake_model cache

  • delete the content of /vendor
    rm -rf vendor

  • run composer install again

but getting same error.

su -c “/var/www/passbolt/bin/cake EmailQueue.preview” -s /bin/bash www-data

Email :
Exception: The email set for “to” is empty. in [/var/www/passbolt/vendor/cakephp/cakephp/src/Mailer/Email.php, line 989]

su -c “/var/www/passbolt/bin/cake passbolt healthcheck” -s /bin/bash www-data

Warning Error: SplFileInfo::openFile(/var/www/passbolt/tmp/cache/persistent/myapp_cake_core_translations_cake_console_en__u_s): failed to open stream: Permission denied in [/var/www/passbolt/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php, line 406]

Warning Error: SplFileInfo::openFile(/var/www/passbolt/tmp/cache/persistent/myapp_cake_core_translations_cake_console_en__u_s): failed to open stream: Permission denied in [/var/www/passbolt/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php, line 406]

Open source password manager for teams

Healthcheck shell

Environment

[PASS] PHP version 7.0.33-0+deb9u3.
[PASS] PCRE compiled with unicode support.
[FAIL] The temporary directory and its content are not writable.
[HELP] Ensure the temporary directory and its content are writable by the webserver user.
[HELP] you can try:
[HELP] sudo chown -R www-data:www-data /var/www/passbolt/tmp/
[HELP] sudo chmod 775 (find /var/www/passbolt/tmp/ -type d) [HELP] sudo chmod 664 (find /var/www/passbolt/tmp/ -type f)
[PASS] The public image directory and its content are writable.
[PASS] The logs directory and its content are writable.
[PASS] GD or Imagick extension is installed.
[PASS] Intl extension is installed.
[PASS] Mbstring extension is installed.

Config files

[PASS] The application config file is present
[PASS] The passbolt config file is present

Core config

[PASS] Debug mode is off.
[PASS] Cache is working.
[PASS] Unique value set for security.salt
[PASS] Full base url is set to https://secure.hostname
[PASS] App.fullBaseUrl validation OK.
[PASS] /healthcheck/status is reachable.

SSL Certificate

[FAIL] SSL peer certificate does not validate
[FAIL] Hostname does not match when validating certificates.
[WARN] Using a self-signed certificate
[HELP] fopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
fopen(): Failed to enable crypto
fopen(https://secure.hostname/healthcheck/status.json): failed to open stream: operation failed

Database

[PASS] The application is able to connect to the database
[PASS] 26 tables found
[PASS] Some default content is present
[PASS] The database schema up to date.

GPG Configuration

[PASS] PHP GPG Module is installed and loaded.
[PASS] The environment variable GNUPGHOME is set to /home/www-data/.gnupg.
[PASS] The directory /home/www-data/.gnupg containing the keyring is writable by the webserver user.
[PASS] The server gpg key is not the default one
[PASS] The public key file is defined in config/passbolt.php and readable.
[PASS] The private key file is defined in config/passbolt.php and readable.
[PASS] The server key fingerprint matches the one defined in config/passbolt.php.
[PASS] The server public key defined in the config/passbolt.php (or environment variables) is in the keyring.
[PASS] There is a valid email id defined for the server key.
[PASS] The public key can be used to encrypt a message.
[PASS] The private key can be used to sign a message.
[PASS] The public and private keys can be used to encrypt and sign a message.
[PASS] The private key can be used to decrypt a message.
[PASS] The private key can be used to decrypt and verify a message.
[FAIL] The public key cannot be used to verify a signature.

Application configuration

[PASS] Using latest passbolt version (2.10.0).
[PASS] Passbolt is configured to force SSL use.
[PASS] App.fullBaseUrl is set to HTTPS.
[PASS] Selenium API endpoints are disabled.
[PASS] Search engine robots are told not to index content.
[PASS] Registration is closed, only administrators can add users.
[PASS] Serving the compiled version of the javascript app
[PASS] All email notifications will be sent.

4 error(s) found. Hang in there!

Please, help!.
Older v2.4.0 in a dev environment working without issues, (even if i had to kill several days to make it work)

Hello @senachi

It seems to me your issue is related to you running composer as root.
Also your tmp directory is not writable by the www-data user.

Well, in the end, I had to do multiple installs, and ended up with Ubuntu + nginx. Seems stable now.

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