fix: Fatal error in mail sender accessing $conf->global

Replace $conf->global->MAIN_INFO_SOCIETE_MAIL with getDolGlobalString()
to prevent fatal error when constant is not set. This caused the
cronjob to hang on the productive server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-03-10 14:13:05 +01:00
parent af137e7d83
commit 94356a92da

View file

@ -329,7 +329,7 @@ class PreisBot
$body .= '<br><br><small>Diese E-Mail wurde automatisch vom PreisBot-Modul generiert.</small>';
$body .= '</body></html>';
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM', $conf->global->MAIN_INFO_SOCIETE_MAIL);
$from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM', getDolGlobalString('MAIN_INFO_SOCIETE_MAIL', 'noreply@example.com'));
$mail = new CMailFile(
$subject,