‪TYPO3CMS  ‪main
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 
19 
25 {
29  protected ‪$name = 'Smtp';
30 
34  protected ‪$priority = 40;
35 
39  protected ‪$configurationValues = [
40  'MAIL/transport' => 'smtp',
41  'MAIL/transport_sendmail_command' => '',
42  'MAIL/transport_smtp_server' => 'localhost:25',
43  'MAIL/transport_smtp_encrypt' => '',
44  'MAIL/transport_smtp_username' => '',
45  'MAIL/transport_smtp_password' => '',
46  ];
47 
53  public function ‪getConfigurationValues()
54  {
56  $keys = array_keys(‪$configurationValues);
57  foreach ($keys as $key) {
58  if (!empty($this->postValues['Smtp'][$key])) {
59  ‪$configurationValues[$key] = $this->postValues['Smtp'][$key];
60  }
61  }
62  if (($this->postValues['Mail']['enable'] ?? '') === 'Smtp') {
63  ‪$configurationValues['MAIL/transport'] = 'smtp';
64  }
66  }
67 
73  public function ‪isAvailable()
74  {
75  return true;
76  }
77 }
‪TYPO3\CMS\Install\Configuration\AbstractPreset
Definition: AbstractPreset.php:27
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset
Definition: SmtpPreset.php:25
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\getConfigurationValues
‪array getConfigurationValues()
Definition: SmtpPreset.php:50
‪TYPO3\CMS\Install\Configuration\Mail
Definition: CustomPreset.php:16
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\$configurationValues
‪array $configurationValues
Definition: SmtpPreset.php:36
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\$name
‪string $name
Definition: SmtpPreset.php:28
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\isAvailable
‪bool isAvailable()
Definition: SmtpPreset.php:70
‪TYPO3\CMS\Install\Configuration\Mail\SmtpPreset\$priority
‪int $priority
Definition: SmtpPreset.php:32