# Passbolt is not sending any email

**URL:** <https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506>\
**Category:** Installation Issues\
**Created:** [March 31, 2018, 10:17am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506 "2018-03-31T10:17:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://community.passbolt.com/u/Sam)\
**Post date:** [March 31, 2018, 10:17am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/1 "2018-03-31T10:17:24Z")

</div>

I’m using passbolt docker(2.0.0-rc2). I started the container with the following variables:  
-e “[EMAIL\_DEFAULT\_FROM=passbolt@blub.de](mailto:EMAIL_DEFAULT_FROM=passbolt@blub.de)”   
-e “EMAIL\_TRANSPORT\_DEFAULT\_HOST=[send.one.com](http://send.one.com)”   
-e “EMAIL\_TRANSPORT\_DEFAULT\_PORT=465”   
-e “EMAIL\_TRANSPORT\_DEFAULT\_TLS=true”   
-e “[EMAIL\_TRANSPORT\_DEFAULT\_USERNAME=passbolt@blub.de](mailto:EMAIL_TRANSPORT_DEFAULT_USERNAME=passbolt@blub.de)”   
-e “EMAIL\_TRANSPORT\_DEFAULT\_PASSWORD=blubblub”   
-e “APP\_FULL\_BASE\_URL=[https://myWebsite.de/passbolt](https://myWebsite.de/passbolt)” \

**./bin/cake EmailQueue.preview** is showing me a lot of emails. Headers:

> From: [passbolt@blub.de](mailto:passbolt@blub.de)  
> Return-Path: [passbolt@blub.de](mailto:passbolt@blub.de)  
> To: [myEmail@hotmail.com](mailto: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.

---

<div class="post-metadata">

**Author:** ![kevin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/kevin/32/128_2.png) [@kevin](https://community.passbolt.com/u/kevin)\
**Post date:** [March 31, 2018, 10:41am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/2 "2018-03-31T10:41:59Z")

</div>

Hi Sam,

In passbolt v2 we have introduced a new tool to help debug the email configuration.

You can run the command below:  
`bin/cake passbolt send_test_email`

It will give you more details about what is going wrong with your configuration.

Keep us posted with your findings.

Cheers,

---

<div class="post-metadata">

**Author:** ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://community.passbolt.com/u/Sam)\
**Post date:** [March 31, 2018, 11:20am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/3 "2018-03-31T11:20:37Z")

</div>

Hi @kevin,  
the output:

> 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]
> 
> ```
> ______  ____  
> / __\____  _________ / /_ ____ / / /_ 
> 
> ```
> 
> / /_/ / \_\_ `/ / / \_\_ / \_\_ / / \_/  
> / **/ // (** | ) // / // / / /  
> // \_,/_ **/** _/._ **/\_** _/_/\_\_/
> 
> ## Open source password manager for teams
> 
> ## Debug email shell
> 
> ## Email configuration
> 
> Host: [send.one.com](http://send.one.com)  
> Port: 465  
> Username: [passbolt@blub.de](mailto:passbolt@blub.de)  
> Password: \*\*\*\*\*\*\*\*\*  
> TLS: true
> 
> 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]
> 
> ## Sending email from: (p ) Sending email to: [doesnotexist@passboltdummydomain.com](mailto:doesnotexist@passboltdummydomain.com)
> 
> Trace
> 
> A test email could not be sent.  
> Error: SMTP timeout.

thanks for the fast reply

---

<div class="post-metadata">

**Author:** ![kevin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/kevin/32/128_2.png) [@kevin](https://community.passbolt.com/u/kevin)\
**Post date:** [March 31, 2018, 11:26am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/4 "2018-03-31T11:26:20Z")

</div>

> [@Sam](#):
>
> Warning Error: key() expects parameter 1 to be array, string given in [/var/www/passbolt/src/Shell/Task/SendTestEmailTask.php, line 112]

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:

```auto
'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.

---

<div class="post-metadata">

**Author:** ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://community.passbolt.com/u/Sam)\
**Post date:** [March 31, 2018, 11:34am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/6 "2018-03-31T11:34:53Z")

</div>

ok. I don’t even have a “passbolt.php” only a “passbolt.default.php”. I have an “app.php” with the following email-configs:

> ‘EmailTransport’ =\> [  
> ‘default’ =\> [  
> ‘className’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_CLASS\_NAME’, ‘Smtp’),  
> // The following keys are used in SMTP transports  
> ‘host’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_HOST’, ‘localhost’),  
> ‘port’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_PORT’, 25),  
> ‘timeout’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_TIMEOUT’, 30),  
> ‘username’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_USERNAME’, null),  
> ‘password’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_PASSWORD’, null),  
> ‘client’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_CLIENT’, null),  
> ‘tls’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_TLS’, null),  
> ‘url’ =\> env(‘EMAIL\_TRANSPORT\_DEFAULT\_URL’, null),  
> ],  
> ‘Debug’ =\> [  
> ‘className’ =\> ‘Debug’  
> ],  
> ],
> 
> ```
> /**
> * 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',
> ],
> ],
> 
> ```

---

<div class="post-metadata">

**Author:** ![kevin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/kevin/32/128_2.png) [@kevin](https://community.passbolt.com/u/kevin)\
**Post date:** [March 31, 2018, 12:22pm UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/7 "2018-03-31T12:22:06Z")

</div>

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.

Let me know how it goes.

---

<div class="post-metadata">

**Author:** ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://community.passbolt.com/u/Sam)\
**Post date:** [April 1, 2018, 7:37am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/8 "2018-04-01T07:37:05Z")

</div>

Thanks for digging. I could solve the problem!

---

<div class="post-metadata">

**Author:** ![cedric](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/cedric/32/3868_2.png) [@cedric](https://community.passbolt.com/u/cedric)\
**Post date:** [April 1, 2018, 7:50am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/9 "2018-04-01T07:50:27Z")

</div>

Hi @Sam,  
Could you share the solution with the community.  
Thanks a lot

---

<div class="post-metadata">

**Author:** ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://community.passbolt.com/u/Sam)\
**Post date:** [April 1, 2018, 10:24am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/10 "2018-04-01T10:24:48Z")

</div>

I had to change the port from 465 to 587. I don’t really know why, but I think it has nothing to do with passbolt.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/b/bee7d3f9329f668000d46e9fcb2e5db1e9d31348.svg) [@system](https://community.passbolt.com/u/system)\
**Post date:** [April 6, 2018, 10:25am UTC](https://community.passbolt.com/t/passbolt-is-not-sending-any-email/506/11 "2018-04-06T10:25:15Z")

</div>

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