ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMailMimeTransportFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public function __construct(protected ilSetting $settings, private readonly ilAppEventHandler $event_handler)
24 {
25 }
26
28 {
29 if (!$this->settings->get('mail_allow_external', '0')) {
30 return new ilMailMimeTransportNull();
31 }
32
33 if ($this->settings->get('mail_smtp_status', '0')) {
34 return new ilMailMimeTransportSmtp($this->settings, $this->event_handler);
35 }
36
37 return new ilMailMimeTransportSendmail($this->settings, $this->event_handler);
38 }
39}
Global event handler.
__construct(protected ilSetting $settings, private readonly ilAppEventHandler $event_handler)
ILIAS Setting Class.