ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilMailMimeTransportFactory.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
3/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4
6{
8 protected $settings;
9
12
19 {
20 $this->settings = $settings;
21 $this->eventHandler = $eventHandler;
22 }
23
28 {
29 if (!(bool) $this->settings->get('mail_allow_external')) {
30 return new ilMailMimeTransportNull();
31 }
32
33 if ((bool) $this->settings->get('mail_smtp_status')) {
34 return new ilMailMimeTransportSmtp($this->settings, $this->eventHandler);
35 }
36
37 return new ilMailMimeTransportSendmail($this->settings, $this->eventHandler);
38 }
39}
An exception for terminatinating execution or to throw for unit testing.
Global event handler.
__construct(ilSetting $settings, ilAppEventHandler $eventHandler)
ilMailMimeTransportFactory constructor.
Class ilMailMimeTransportNull.
Class ilMailMimeTransportSendmail.
Class ilMailMimeTransportSmtp.
ILIAS Setting Class.
Interface ilMailMimeTransport.
settings()
Definition: settings.php:2