From b9f4fb0e9898398f725d3a6bc4e4a62dfaee19f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Mar 2024 16:28:11 +0100 Subject: [PATCH] Fix sending email for backup_backup --- scripts/backup_backups.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/backup_backups.php b/scripts/backup_backups.php index 9014ee516..dde5c3d40 100755 --- a/scripts/backup_backups.php +++ b/scripts/backup_backups.php @@ -615,6 +615,12 @@ //Delete temporary emptydir dol_delete_dir($homedir."/emptydir"); + +// Force sending email using mail method because $dbmaster and $conf come from the master server and +// the setup may ask to use a relay no allowed for deployment servers. +$conf->global->MAIN_MAIL_SENDMODE = 'mail'; + + // Send email if there is one error if ($atleastoneerror != 0) { $subject = '[Warning] Error(s) in backups of backups to remote server(s) - '.gethostname().' - '.dol_print_date(dol_now(), 'dayrfc');