nitsan-technologies / ns_backup

Backup Plus
https://t3planet.com/typo3-backup-extension
GNU General Public License v3.0
0 stars 0 forks source link

Problems with Email settings #1

Open SOFTWORK opened 2 years ago

SOFTWORK commented 2 years ago

The Script want to send an Email, but schon sender Email was not properly configured - so the Backup Process terminates. Please add also a path configuration for the tar command, we need the tar command in the webspace dir. The value sendOnlyOnError is not saved to db after click to save botton.

I modified the BackupBaseController.php file.

    $json = '
        {
            "verbose": true,
            "debug": false,
            "logging": [
                {
                    "type": "json",
                    "target": "'.$logFile.'"
                },
                {
                    "type": "mail",
                    "options": {
                    "transport": "null",    <--------------------------
                    "recipients": "'.$this->globalSettingsData[0]->emails.'",
                    "subject": "['.$backupType.'] '.$backupNameOriginal. ' - '.$this->globalSettingsData[0]->emailSubject.'",
                    "sendOnlyOnError": "'.$this->globalSettingsData[0]->emailNotificationOnError.'"
                    }
                }
            ],

            $json .= '
            "source": {
                "type": "tar",
                "options": {
                    "path": "'.$sourcePath.'"'.$ignoreUploads.',
                    "pathToTar": "/www/htdocs/w00ede36/bin/"
                }
            },';
nitsan-technologies commented 2 years ago

Hey!

The Script want to send an Email, but schon sender Email was not properly configured - so the Backup Process terminates.

Well, we have tested the free version and it seems works well. You should configure your email server. Your provide suggestion "transport": "null", is not recommended globally; By default, we have setup "mail" as suggested at official documentation at https://phpbu.de/manual/current/en/logging.html#logging.email

Please add also a path configuration for the tar command, we need the tar command in the webspace dir.

Hmm, that's a good suggestion. Our team will check in-depth to implement for a nearer future version.

The value sendOnlyOnError is not saved to db after click to save botton.

Can you please check your Database Analyzer? Maybe missed the SQL field.

For the contribution, It would be nice if you create PR for better code review ;)

Cheers, Team NITSAN