./bin/cake EmailQueue.preview is showing me a lot of emails. Headers:
From: passbolt@blub.de
Return-Path: passbolt@blub.de
To: myEmail@hotmail.com
Date: Sat, 31 Mar 2018 10:10:53 +0000
Subject: Welcome to passbolt, Samuel!
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
./bin/cake EmailQueue.sender is telling me nothing
The logs: cli-debug.log:
2018-03-31 10:10:53 Notice: Notice (8): Trying to get property ‘url’ of non-object in [/var/www/passbolt/src/Template/Email/html/AN/user_register_self.ctp, line 22] cli-error.log:
2018-03-30 16:16:56 Warning: Warning (2): array_keys() expects parameter 1 to be array, null given in [/var/www/passbolt/plugins/PassboltTestData/src/Shell/Task/DataTask.php, line 41] error.log:
2018-03-31 10:02:00 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/settings.json” could not be found.
Request URL: /settings.json?api-version=v2
The smtp settings are working with other programs.
Warning Error: array_keys() expects parameter 1 to be array, null given in [/var/www/passbolt/plugins/PassboltTestData/src/Shell/Task/DataTask.php, line 41]
Warning Error: key() expects parameter 1 to be array, string given in [/var/www/passbolt/src/Shell/Task/SendTestEmailTask.php, line 112]
2018-03-31 11:17:22 Warning: Warning (2): key() expects parameter 1 to be array, string given in [/var/www/passbolt/src/Shell/Task/SendTestEmailTask.php, line 112]
Warning Error: key() expects parameter 1 to be array, string given in [/var/www/passbolt/src/Shell/Task/SendTestEmailTask.php, line 113]
2018-03-31 11:17:22 Warning: Warning (2): key() expects parameter 1 to be array, string given in [/var/www/passbolt/src/Shell/Task/SendTestEmailTask.php, line 113]
Notice Error: String offset cast occurred in [/var/www/passbolt/src/Shell/Task/SendTestEmailTask.php, line 113]
2018-03-31 11:17:22 Notice: Notice (8): String offset cast occurred in [/var/www/passbolt/src/Shell/Task/SendTestEmailTask.php, line 113]
It looks like your configuration is not following the right format. Could you make sure that your Email section in passbolt.php looks like this:
'Email' => [
'default' => [
// Defines the default name and email of the sender of the emails.
'from' => ['passbolt@your_organization.com' => 'Passbolt'],
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
],
‘from’ should be an array containing the email as a key, and the name of the sender as a value.
/**
* Email delivery profiles
*
* Delivery profiles allow you to predefine various properties about email
* messages from your application and give the settings a name. This saves
* duplication across your application and makes maintenance and development
* easier. Each profile accepts a number of keys. See `Cake\Mailer\Email`
* for more information.
*/
'Email' => [
'default' => [
'transport' => env('EMAIL_DEFAULT_TRANSPORT', 'default'),
'from' => env('EMAIL_DEFAULT_FROM', 'you@localhost'),
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
],
],
passbolt.php is indeed not present in the case of a docker container environment.
For the rest, I have digged a little:
The error messages that you see in your console when you do a send_test_email do not prevent the email to be sent (it’s still a bug in our code which happens while using the docker container, which we’ll fix).
The send_test_email command returns A test email could not be sent. Error: SMTP timeout.. So it looks like your smtp server can’t be reached from inside the docker container for some reason (network issue, firewall, etc…). To debug this, you could probably open a console inside your container and try to connect to your smtp server with telnet.