diff options
Diffstat (limited to 'email-backup')
-rw-r--r-- | email-backup | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/email-backup b/email-backup index e9a75cd..0ba4d45 100644 --- a/email-backup +++ b/email-backup @@ -15,8 +15,6 @@ :global BackupSendBinary; :global BackupSendExport; :global Domain; -:global EmailBackupCc; -:global EmailBackupTo; :global Identity; :global CharacterReplace; @@ -25,6 +23,7 @@ :global MkDir; :global RandomDelay; :global ScriptFromTerminal; +:global SendEMail2; :global WaitForFile; :global WaitFullyConnected; @@ -33,10 +32,6 @@ $LogPrintExit2 error $0 ("Configured to send neither backup nor config export.") true; } -:if ([ :len $EmailBackupTo ] = 0) do={ - $LogPrintExit2 error $0 ("Configuration is missing recipient for e-mail backup.") true; -} - $WaitFullyConnected; :if ([ $ScriptFromTerminal $0 ] = false && $BackupRandomDelay > 0) do={ @@ -71,11 +66,11 @@ $WaitFullyConnected; } # send email with status and files -/ tool e-mail send to=$EmailBackupTo cc=$EmailBackupCc \ - subject=("[" . $Identity . "] Backup & Config") \ - body=("See attached files for backup and config export for " . \ - $Identity . ".\n\n" . \ - [ $DeviceInfo ] . "\n\n" . \ - "Backup file: " . $BackupFile . "\n" . \ - "Config file: " . $ConfigFile) \ - file=$Attach; +$SendEMail2 ({ origin=$0; \ + subject=("Backup & Config"); \ + message=("See attached files for backup and config export for " . \ + $Identity . ".\n\n" . \ + [ $DeviceInfo ] . "\n\n" . \ + "Backup file: " . $BackupFile . "\n" . \ + "Config file: " . $ConfigFile); \ + attach=$Attach }); |