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