ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMailMimeTransportFactory.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3
5{
7 protected $settings;
8
11
18 {
19 $this->settings = $settings;
20 $this->eventHandler = $eventHandler;
21 }
22
26 public function getTransport()
27 {
28 if (!(bool) $this->settings->get('mail_allow_external')) {
29 return new ilMailMimeTransportNull();
30 }
31
32 if ((bool) $this->settings->get('mail_smtp_status')) {
33 return new ilMailMimeTransportSmtp($this->settings, $this->eventHandler);
34 } else {
35 return new ilMailMimeTransportSendmail($this->settings, $this->eventHandler);
36 }
37 }
38}
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.
settings()
Definition: settings.php:2