diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php
index daaebd09ecf..1d3df8191a6 100644
--- a/htdocs/core/class/utils.class.php
+++ b/htdocs/core/class/utils.class.php
@@ -1298,9 +1298,13 @@ class Utils
}
if ($filepath) {
- if ($filesize > 100000000) {
- $output = 'Sorry, last backup file is too large to be send by email';
- $error++;
+ if ($filesize > $sizelimit) {
+ $message .= '
'.$langs->trans("BackupIsTooLargeSend");
+ $documenturl = $dolibarr_main_url_root.'/document.php?modulepart=systemtools&atachement=1&file=backup/'.urlencode($filename[0]);
+ $message .= '
Lien de téléchargement';
+ $filepath = '';
+ $mimetype = '';
+ $filename = '';
}
} else {
$output = 'No backup file found';