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 
10  private $eventHandler;
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 }
Global event handler.
settings()
Definition: settings.php:2
Class ilMailMimeTransportSmtp.
Class ilMailMimeTransportNull.
__construct(\ilSetting $settings, \ilAppEventHandler $eventHandler)
ilMailMimeTransportFactory constructor.
Class ilMailMimeTransportSendmail.