Skip to main content

Why are my emails not being sent?

Why are my emails not being sent?

This can come from a variety of reasons, here are the most common ones.

Reason 1: Configuration issues

There may be an issue with some of the SMTP configuration items, such as credentials, or the hostname, or the port for the selected protocol.

By default passbolt is quite discrete on why a given configuration is not working. You can use the following command to send a test email and get more debug information (replace www-data with nginx if you are running a RHEL-like server, or wwwrun in case you are using OpenSUSE):

sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake passbolt send_test_email [email protected]"

If this fails you should double check what is the recommended configuration in your email provider documentation. You can also ask on the community forum in case another user have a working configuration for the same provider.

Reason 2: Email notifications are disabled in the config

Another reason could be because email notifications are disabled in your configuration. You can review such settings in the administration panel, when you are logged in as an administrator in passbolt.

Email Notification Settings - Email Delivery
fig. Email Notification Settings - Email Delivery

Reason 3: The cron system is stopped

Passbolt uses a system of email queue to send email notifications. A dedicated cron job (located in /etc/cron.d/passbolt-pro-server or /etc/cron.d/passbolt-ce-server) runs every minute to go through the queue and send emails.

So if you manage to send the test email but are not receiving notifications (such as registration emails), one of the reason may be that the cron service is stopped.

You can verify if the service is running by executing this command:

sudo systemctl status cron.service

You can also verify cronjobs activity with this command:

sudo journalctl -fu cron.service

If after an update you are getting error messages such as:

Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘’ in ‘field list’ ...

It is possible that the wrong version of the data model is stored in the cache. This can happen if the cache is not cleared after an install or an update. You can try clearing out the cache to solve this(replace www-data with nginx if you are running a RHEL-like server, or wwwrun in case you are using OpenSUSE).

sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake cache clear_all"

Reason 5: You are using credentials password instead of application password

Some email providers will not let you use the password from your organization account for security purposes. It means that if you’re trying to use the authentication method “Username & Password” it will result in a failure if you are using something other than an application password.

Listing email queue entries

You can use the show_queued_emails passbolt command to display email queue entries from the database. This is useful when there is an issue sending emails as it will output any errors that have been logged with sending emails.

sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake passbolt show_queued_emails"
Show queued emails command
fig. Show queued emails command

By default, the 15 most recent records from the email_queue table will be displayed; however, it is also possible to filter the records further. See all the available options below:

  • --limit = Number of records to show (Range: min 1 & max 100). Default is 15.
  • --failed = Return only records with an error.
  • --oldest = Displays older records first (sorted by date).
Show queued emails command with all options
fig. Show queued emails command with all options