Email configuration on Docker #795
Unanswered
KristopherMackowiak
asked this question in
General
Replies: 3 comments
-
from what I can see, LeanTime currently does not pull from ENV. Everything is setup in the config/configuration.php file. To get ENV working, you'll need to:
I haven't tested this personally, but this SHOULD work for getting your ENV settings to work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is true for env files. However it does work for server variables
already (https://httpd.apache.org/docs/current/env.html)
```
<VirtualHost hostname:80>
...
SetEnv VARIABLE_NAME variable_value
...
</VirtualHost>
```
In addition to that these variables can be used when you initialize docker.
They work the same way (in that they are global server variables)
…On Thu, Jul 21, 2022 at 11:29 AM Funky Waddle ***@***.***> wrote:
from what I can see, LeanTime currently does not pull from ENV. Everything
is setup in the config/configuration.php file.
To get ENV working, you'll need to:
1. install the dotenv package from composer: composer require
vlucas/phpdotenv
2. initialize the package in public/index.php AFTER the defining of
BASE_URL (right before the $login variable setting)
$dotenv = Dotenv\Dotenv::createImmutable(BASE_URL); $dotenv->load();
3. create your .env file in the root of the application (in the root,
not in public)
4. then call getenv() in the config/configuration.php file for each
setting you set in .env
I haven't tested this personally, but this SHOULD work for getting your
ENV settings to work.
—
Reply to this email directly, view it on GitHub
<#795 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALG4EFXYZ4BVOWSZHIKUBZDVVFUGTANCNFSM5365RA4A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
There is also the use_smtp flag that needs to be set to true:
LEAN_EMAIL_USE_SMTP
Did you set that one? The config file lists all the env vars on the bottom:
https://github.com/Leantime/leantime/blob/7656494bb6e939df77904bd92540bfc1a40dcdaf/config/configuration.sample.php#L130
I’ll need to add that to the docs…
…On Tue, Jul 19, 2022 at 3:33 AM KristopherMackowiak < ***@***.***> wrote:
Hi.
I'm trying to set up email via ENV and I'm trying to:
LEAN_EMAIL_SMTP_HOSTS
LEAN_EMAIL_SMTP_PASSWORD
LEAN_EMAIL_SMTP_PORT
LEAN_EMAIL_SMTP_USERNAME
and
LEAN_SMTP_HOSTS
LEAN_SMTP_PASSWORD
LEAN_SMTP_PORT
LEAN_SMTP_USERNAME
both configurations do not work
—
Reply to this email directly, view it on GitHub
<#795>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALG4EFVPRZKJB3LF3ZS4XPLVUZK5PANCNFSM5365RA4A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I'm trying to set up email via ENV and I'm trying to:
LEAN_EMAIL_SMTP_HOSTS
LEAN_EMAIL_SMTP_PASSWORD
LEAN_EMAIL_SMTP_PORT
LEAN_EMAIL_SMTP_USERNAME
and
LEAN_SMTP_HOSTS
LEAN_SMTP_PASSWORD
LEAN_SMTP_PORT
LEAN_SMTP_USERNAME
both configurations do not work
Beta Was this translation helpful? Give feedback.
All reactions