ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 {
9  protected $settings;
10 
15  public function __construct(\ilSetting $settings)
16  {
17  $this->settings = $settings;
18  }
19 
23  public function getTransport()
24  {
25  if (!(bool) $this->settings->get('mail_allow_external')) {
26  require_once 'Services/Mail/classes/Mime/Transport/class.ilMailMimeTransportNull.php';
27  return new ilMailMimeTransportNull();
28  }
29 
30  if ((bool) $this->settings->get('mail_smtp_status')) {
31  require_once 'Services/Mail/classes/Mime/Transport/class.ilMailMimeTransportSmtp.php';
32  return new ilMailMimeTransportSmtp($this->settings);
33  } else {
34  require_once 'Services/Mail/classes/Mime/Transport/class.ilMailMimeTransportSendmail.php';
35  return new ilMailMimeTransportSendmail($this->settings);
36  }
37  }
38 }
__construct(\ilSetting $settings)
ilMailMimeTransportFactory constructor.
Class ilMailMimeTransportSmtp.
Class ilMailMimeTransportNull.
Class ilMailMimeTransportSendmail.
settings()
Definition: settings.php:2