[TASK] Add preset for mail SMTP settings in install tool
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Classes / Configuration / Mail / SendmailPreset.php
index e9109dd..9ffe540 100644 (file)
@@ -34,9 +34,14 @@ class SendmailPreset extends Configuration\AbstractPreset
     /**
      * @var array Configuration values handled by this preset
      */
-    protected $configurationValues = array(
+    protected $configurationValues = [
+        'MAIL/transport' => 'sendmail',
         'MAIL/transport_sendmail_command' => '',
-    );
+        'MAIL/transport_smtp_server' => '',
+        'MAIL/transport_smtp_encrypt' => '',
+        'MAIL/transport_smtp_username' => '',
+        'MAIL/transport_smtp_password' => '',
+        ];
 
     /**
      * Get configuration values to activate prefix
@@ -47,6 +52,9 @@ class SendmailPreset extends Configuration\AbstractPreset
     {
         $configurationValues = $this->configurationValues;
         $configurationValues['MAIL/transport_sendmail_command'] = $this->getSendmailPath();
+        if ($this->postValues['Mail']['enable'] === 'Sendmail') {
+            $configurationValues['MAIL/transport'] = 'sendmail';
+        }
         return $configurationValues;
     }