This commit is contained in:
2025-12-27 01:10:01 +01:00
parent 77844135dc
commit 5f2817f69b
2 changed files with 24 additions and 20 deletions

View File

@@ -14,13 +14,15 @@ $emailtemplates = [
* nutzen. Beispiel (Platzhalter bitte anpassen/entfernen):
*/
putenv('EMAILTEMPLATE_API_BASE=' . (getenv('EMAILTEMPLATE_API_BASE') ?: 'https://staging.emailtemplate.it/external/render'));
putenv('EMAILTEMPLATE_API_TOKEN=' . (getenv('EMAILTEMPLATE_API_TOKEN') ?: ''));
putenv('MAIL_TRANSPORT=' . (getenv('MAIL_TRANSPORT') ?: 'smtp'));
putenv('MAIL_FROM=' . (getenv('MAIL_FROM') ?: 'no-reply@papa-kind-treff.info'));
putenv('MAIL_FROM_NAME=' . (getenv('MAIL_FROM_NAME') ?: 'Papa-Kind-Treff'));
putenv('SMTP_HOST=' . (getenv('SMTP_HOST') ?: ''));
putenv('SMTP_PORT=' . (getenv('SMTP_PORT') ?: '587'));
putenv('SMTP_USER=' . (getenv('SMTP_USER') ?: ''));
putenv('SMTP_PASS=' . (getenv('SMTP_PASS') ?: ''));
putenv('SMTP_SECURE=' . (getenv('SMTP_SECURE') ?: 'tls'));
// putenv erwartet den String "KEY=VALUE". Die if-Blöcke setzen nur dann Defaults,
// wenn in der Umgebung noch nichts gesetzt ist.
if (getenv('EMAILTEMPLATE_API_BASE') === false) putenv('EMAILTEMPLATE_API_BASE=https://staging.emailtemplate.it/external/render');
if (getenv('EMAILTEMPLATE_API_TOKEN') === false) putenv('EMAILTEMPLATE_API_TOKEN=qYLV9OLOJ48WPs0CLrnOWpkok1o1wRN_kGsdMVzumzPEYQP-rHxhnn0YlSWGW5hH');
if (getenv('MAIL_TRANSPORT') === false) putenv('MAIL_TRANSPORT=smtp');
if (getenv('MAIL_FROM') === false) putenv('MAIL_FROM=no-reply@papa-kind-treff.info');
if (getenv('MAIL_FROM_NAME') === false) putenv('MAIL_FROM_NAME=Papa-Kind-Treff');
if (getenv('SMTP_HOST') === false) putenv('SMTP_HOST=');
if (getenv('SMTP_PORT') === false) putenv('SMTP_PORT=587');
if (getenv('SMTP_USER') === false) putenv('SMTP_USER=');
if (getenv('SMTP_PASS') === false) putenv('SMTP_PASS=');
if (getenv('SMTP_SECURE') === false) putenv('SMTP_SECURE=tls');