‪TYPO3CMS  10.4
SendmailPreset.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 = 'Sendmail';
31 
35  protected ‪$priority = 50;
36 
40  protected ‪$configurationValues = [
41  'MAIL/transport' => 'sendmail',
42  'MAIL/transport_sendmail_command' => '',
43  'MAIL/transport_smtp_server' => '',
44  'MAIL/transport_smtp_encrypt' => '',
45  'MAIL/transport_smtp_username' => '',
46  'MAIL/transport_smtp_password' => '',
47  ];
48 
54  public function ‪getConfigurationValues()
55  {
57  ‪$configurationValues['MAIL/transport_sendmail_command'] = $this->‪getSendmailPath();
58  if ($this->postValues['Mail']['enable'] === 'Sendmail') {
59  ‪$configurationValues['MAIL/transport'] = 'sendmail';
60  }
62  }
63 
69  public function ‪isAvailable()
70  {
71  return !empty($this->‪getSendmailPath());
72  }
73 
79  public function ‪getSendmailPath()
80  {
81  return ini_get('sendmail_path');
82  }
83 
89  public function ‪isActive()
90  {
91  $this->configurationValues['MAIL/transport_sendmail_command'] = $this->‪getSendmailPath();
92  return parent::isActive();
93  }
94 }
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\$priority
‪int $priority
Definition: SendmailPreset.php:33
‪TYPO3\CMS\Install\Configuration\AbstractPreset
Definition: AbstractPreset.php:27
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset
Definition: SendmailPreset.php:26
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\getConfigurationValues
‪array getConfigurationValues()
Definition: SendmailPreset.php:51
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\isAvailable
‪bool isAvailable()
Definition: SendmailPreset.php:66
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\$configurationValues
‪array $configurationValues
Definition: SendmailPreset.php:37
‪TYPO3\CMS\Install\Configuration\Mail
Definition: CustomPreset.php:16
‪TYPO3\CMS\Install\Configuration
Definition: AbstractCustomPreset.php:16
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\$name
‪string $name
Definition: SendmailPreset.php:29
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\getSendmailPath
‪string bool getSendmailPath()
Definition: SendmailPreset.php:76
‪TYPO3\CMS\Install\Configuration\Mail\SendmailPreset\isActive
‪bool isActive()
Definition: SendmailPreset.php:86