Skip to content

Commit

Permalink
Fix sending email for backup_backup
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 13, 2024
1 parent f442e2c commit b9f4fb0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/backup_backups.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit b9f4fb0

Please sign in to comment.