load smtp seetings into moodle

This commit is contained in:
2026-01-27 15:51:18 +01:00
parent 0c829b2c3b
commit ec49e12b52
2 changed files with 12 additions and 2 deletions

View File

@ -7,9 +7,10 @@ services:
- smtp_password
environment:
- SMTP_HOST=${SMTP_HOST}
- SMTP_USER=${SMTP_USER}
- SMTP_PORT=${SMTP_PORT:-25}
- SMTP_AUTH=${SMTP_AUTH}
- SMTP_TLS=${SMTP_TLS}
- SMTP_AUT_TYPEH=${SMTP_AUT_TYPEH}
- SMTP_SECURE=${SMTP_SECURE}
- MAIL_FROM=${MAIL_FROM}
secrets:

View File

@ -236,6 +236,15 @@ $CFG->directorypermissions = 02777;
$CFG->admin = 'admin';
// Coop cloud additional setting:
$CFG->smtphosts = '{{ env "SMTP_HOST" }}:{{ env "SMTP_PORT" }}';
$CFG->smtpuser = '{{ env "SMTP_USER" }}';
$CFG->smtppass = trim(file_get_contents('/run/secrets/smtp_password'));
$CFG->smtpsecure = '{{ env "SMTP_SECURE" }}'; // 'ssl' oder 'tls'
$CFG->smtpauthtype = '{{ env "SMTP_AUTH_TYPE" }}';
$CFG->noreplyaddress = '{{ env "MAIL_FROM" }}';
//=========================================================================
// 6. OTHER MISCELLANEOUS SETTINGS (ignore these for new installations)