‪TYPO3CMS  9.5
SmtpPreset.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
18 
24 {
28  protected ‪$name = 'Smtp';
29 
33  protected ‪$priority = 40;
34 
38  protected ‪$configurationValues = [
39  'MAIL/transport' => 'smtp',
40  'MAIL/transport_sendmail_command' => '',
41  'MAIL/transport_smtp_server' => 'localhost:25',
42  'MAIL/transport_smtp_encrypt' => '',
43  'MAIL/transport_smtp_username' => '',
44  'MAIL/transport_smtp_password' => '',
45  ];
46 
52  public function ‪getConfigurationValues()
53  {
55  $keys = array_keys(‪$configurationValues);
56  foreach ($keys as $key) {
57  if (!empty($this->postValues['Smtp'][$key])) {
58  ‪$configurationValues[$key] = $this->postValues['Smtp'][$key];
59  }
60  }
61  if ($this->postValues['Mail']['enable'] === 'Smtp') {
62  ‪$configurationValues['MAIL/transport'] = 'smtp';
63  }
65  }
66 
72  public function ‪isAvailable()
73  {
74  return true;
75  }
76 }
‪TYPO3\CMS\Install\Configuration\AbstractPreset
Definition: AbstractPreset.php:26
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset
Definition: SmtpPreset.php:24
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\getConfigurationValues
‪array getConfigurationValues()
Definition: SmtpPreset.php:49
‪TYPO3\CMS\Install\Configuration\Mail
Definition: CustomPreset.php:2
‪TYPO3\CMS\Install\Configuration
Definition: AbstractCustomPreset.php:2
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\$configurationValues
‪array $configurationValues
Definition: SmtpPreset.php:35
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\$name
‪string $name
Definition: SmtpPreset.php:27
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\isAvailable
‪bool isAvailable()
Definition: SmtpPreset.php:69
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\$priority
‪int $priority
Definition: SmtpPreset.php:31