‪TYPO3CMS  9.5
SendmailPreset.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 = 'Sendmail';
29 
33  protected ‪$priority = 50;
34 
38  protected ‪$configurationValues = [
39  'MAIL/transport' => 'sendmail',
40  'MAIL/transport_sendmail_command' => '',
41  'MAIL/transport_smtp_server' => '',
42  'MAIL/transport_smtp_encrypt' => '',
43  'MAIL/transport_smtp_username' => '',
44  'MAIL/transport_smtp_password' => '',
45  ];
46 
52  public function ‪getConfigurationValues()
53  {
55  ‪$configurationValues['MAIL/transport_sendmail_command'] = $this->‪getSendmailPath();
56  if ($this->postValues['Mail']['enable'] === 'Sendmail') {
57  ‪$configurationValues['MAIL/transport'] = 'sendmail';
58  }
60  }
61 
67  public function ‪isAvailable()
68  {
69  return !empty($this->‪getSendmailPath());
70  }
71 
77  public function ‪getSendmailPath()
78  {
79  return ini_get('sendmail_path');
80  }
81 
87  public function ‪isActive()
88  {
89  $this->configurationValues['MAIL/transport_sendmail_command'] = $this->‪getSendmailPath();
90  return parent::isActive();
91  }
92 }
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\$priority
‪int $priority
Definition: SendmailPreset.php:31
‪TYPO3\CMS\Install\Configuration\AbstractPreset
Definition: AbstractPreset.php:26
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset
Definition: SendmailPreset.php:24
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\getConfigurationValues
‪array getConfigurationValues()
Definition: SendmailPreset.php:49
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\isAvailable
‪bool isAvailable()
Definition: SendmailPreset.php:64
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\$configurationValues
‪array $configurationValues
Definition: SendmailPreset.php:35
‪TYPO3\CMS\Install\Configuration\Mail
Definition: CustomPreset.php:2
‪TYPO3\CMS\Install\Configuration
Definition: AbstractCustomPreset.php:2
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\$name
‪string $name
Definition: SendmailPreset.php:27
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\getSendmailPath
‪string bool getSendmailPath()
Definition: SendmailPreset.php:74
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\isActive
‪bool isActive()
Definition: SendmailPreset.php:84