# Docker Compose - How to configure email delivery?

**URL:** https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879
**Category:** Installation Issues
**Created:** [July 24, 2018, 12:31pm UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879 "2018-07-24T12:31:48Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 24, 2018, 12:31pm UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/1 "2018-07-24T12:31:48Z")

</div>

i want to enable mail sending when creating a new user at passbolt dashboard , i installed passbolt using docker compose , and i don’t know which environment variables(env/passbolt.env) to use to send mail to a the new user created by the admin

---

<div class="post-metadata">

### Author: ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)
#### Post date: [July 25, 2018, 3:45am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/2 "2018-07-25T03:45:32Z")

</div>

See. [https://github.com/passbolt/passbolt\_docker#environment-variables-reference](https://github.com/passbolt/passbolt_docker#environment-variables-reference)

| EMAIL\_TRANSPORT\_DEFAULT\_CLASS\_NAME | Email classname | Smtp |
| --- | --- | --- |
| EMAIL\_DEFAULT\_FROM | From email address | you@localhost |
| EMAIL\_DEFAULT\_TRANSPORT | Sets transport method | default |
| EMAIL\_TRANSPORT\_DEFAULT\_HOST | Server hostname | localhost |
| EMAIL\_TRANSPORT\_DEFAULT\_PORT | Server port | 25 |
| EMAIL\_TRANSPORT\_DEFAULT\_TIMEOUT | Timeout | 30 |
| EMAIL\_TRANSPORT\_DEFAULT\_USERNAME | Username for email server auth | null |
| EMAIL\_TRANSPORT\_DEFAULT\_PASSWORD | Password for email server auth | null |
| EMAIL\_TRANSPORT\_DEFAULT\_CLIENT | Client | null |
| EMAIL\_TRANSPORT\_DEFAULT\_TLS | Set tls | null |
| EMAIL\_TRANSPORT\_DEFAULT\_URL | Set url | null |

These map to the cakephp email configuration described here: [https://book.cakephp.org/3.0/en/core-libraries/email.html#configuring-transports](https://book.cakephp.org/3.0/en/core-libraries/email.html#configuring-transports)

---

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 25, 2018, 9:09am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/3 "2018-07-25T09:09:31Z")

</div>

Yes ,by the way i have a Smtp host , what to do to make the server send mail for me , another question  
for these environment variables ; what value to put ,  
EMAIL\_DEFAULT\_FROM (you@localhost) refers to what

this is my SMTP config

var = {mail\_options  
hôte: ’ [gon.smtpServer.com](http://gon.smtpServer.com) ',  
Port: 3005,  
debug: true,  
auth: {  
utilisateur: “zak-des”,  
passer: “\*\*\*\*\*\*\*\*\*\*\*”  
}  
};

---

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 25, 2018, 9:11am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/4 "2018-07-25T09:11:55Z")

</div>

Hi Remy i’ve aleready did this , but still have the same problem ,could you please ,help me to configure my Smtp server so that i can send mails.

Thank you

this is my SMTP CONfig

var = {mail\_options

```
hôte: ' [gon.smtpServer.com](http://gon.smtpServer.com) ',

Port: 3005,

debug: true,

auth: {

	utilisateur: "zak-des",

	passer: " *********"

}

```

};

Le mer. 25 juil. 2018 à 04:55, remy [passbolt@discoursemail.com](mailto:passbolt@discoursemail.com) a écrit :

---

<div class="post-metadata">

### Author: ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)
#### Post date: [July 25, 2018, 9:26am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/5 "2018-07-25T09:26:21Z")

</div>

> [@zakariaaSadek](#):
>
> EMAIL\_DEFAULT\_FROM (you@localhost)

Refers to the email that will shown as the sender.  
To be honest I don’t understand the rest of your request.

---

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 25, 2018, 9:39am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/6 "2018-07-25T09:39:43Z")

</div>

ok, this var — EMAIL\_TRANSPORT\_DEFAULT\_HOST— should contain wich value ?? it should not contain localhost, my problem is that i don’t know what values to put in those environment variables , because here i must put my smtp configuration to make my passbolt , send mails to users created by admin

---

<div class="post-metadata">

### Author: ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)
#### Post date: [July 25, 2018, 9:44am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/7 "2018-07-25T09:44:19Z")

</div>

> EMAIL\_TRANSPORT\_DEFAULT\_HOST

That would be address of the SMTP host, so a the domain / subdomain like `smtp.gmail.com`, or `localhost`.

---

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 25, 2018, 9:49am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/8 "2018-07-25T09:49:49Z")

</div>

So ,the configuration should be like this

(----------------------------------------------------------------------------------)  
EMAIL\_DEFAULT\_FROM=noReply@localhost  
EMAIL\_DEFAULT\_TRANSPORT=Smtp  
EMAIL\_TRANSPORT\_DEFAULT\_HOST=passbolt@MySmtpDomain  
EMAIL\_TRANSPORT\_DEFAULT\_PORT=the Port of MySmtpDomain  
EMAIL\_TRANSPORT\_DEFAULT\_TIMEOUT=30  
EMAIL\_TRANSPORT\_DEFAULT\_USERNAME=the username of MySmtpDomain  
EMAIL\_TRANSPORT\_DEFAULT\_PASSWORD=the password of MySmtpDomain  
EMAIL\_TRANSPORT\_DEFAULT\_CLIENT=null  
EMAIL\_TRANSPORT\_DEFAULT\_TLS=true  
EMAIL\_TRANSPORT\_DEFAULT\_URL=null  
(--------------------------------------------------------------------------------)

---

<div class="post-metadata">

### Author: ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)
#### Post date: [July 25, 2018, 9:51am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/9 "2018-07-25T09:51:24Z")

</div>

Yes something like that. The final configuration depends on your setup.

---

<div class="post-metadata">

### Author: ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)
#### Post date: [July 25, 2018, 9:52am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/10 "2018-07-25T09:52:55Z")

</div>

You can send a test email using the command:

```auto
./bin/cake/passbolt send_test_email

```

That should give you more information about your issues if any.

---

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 25, 2018, 9:54am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/11 "2018-07-25T09:54:50Z")

</div>

that file doesn’t exist because i am running passbolt as a container on docker

---

<div class="post-metadata">

### Author: ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)
#### Post date: [July 25, 2018, 9:58am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/12 "2018-07-25T09:58:26Z")

</div>

See. [https://docs.docker.com/engine/reference/commandline/exec/](https://docs.docker.com/engine/reference/commandline/exec/)

---

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 25, 2018, 10:01am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/13 "2018-07-25T10:01:16Z")

</div>

yep , i knew this , i ran it and it works , i can access to the dashboard , i create user and the user created doesn’t receive any email , this ./bin/cake/passbolt doesn’t exist because passbolt isn’t installed on OS , it is running as a container

---

<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: [July 25, 2018, 10:24am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/14 "2018-07-25T10:24:04Z")

</div>

To open a console on the docker:

1. Get the name of your container

> docker ps -a

1. Execute a bash on the docker

> docker exec -ti CONTAINER\_NAME /bin/bash

1. Switch to www-data user

> su -s /bin/bash www-data

1. Go to the passbolt directory

> cd /var/www/passbolt

---

<div class="post-metadata">

### Author: ![zakariaaSadek](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/zakariaasadek/32/251_2.png) [@zakariaaSadek](https://community.passbolt.com/u/zakariaaSadek)
#### Post date: [July 25, 2018, 11:00am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/15 "2018-07-25T11:00:33Z")

</div>

nope that file doesn’t exist , because passbolt is in a container not installed on The Operation System so there are no suche files

Those are the files in my container

bin(directory) --contains(docker-entrypoint.sh)  
conf(directory) --contains(passbolt.conf–supervisord.conf)  
docker-compose-pro.yml  
Dockerfile  
Gemfile  
ISSUE\_TEMPLATE.md  
Rakefile  
scripts  
CHANGELOG.md  
docker-compose-dev.yml  
docker-compose.yml  
env(directory) – contains(mysql.env --passbolt.env)  
Gemfile.lock  
LICENSE  
README.md  
spec(directory) --contains (docker\_image–docker\_runtime–spec\_helper.rb)

---

<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: [July 27, 2018, 5:21am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/16 "2018-07-27T05:21:45Z")

</div>

Following the instruction I gave you in my previous comment will help you to connect to the container.

---

<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: [August 1, 2018, 5:23am UTC](https://community.passbolt.com/t/docker-compose-how-to-configure-email-delivery/879/17 "2018-08-01T05:23:23Z")

</div>

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