ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMailMimeSenderUser Class Reference

Class ilMailMimeSenderSystem. More...

+ Inheritance diagram for ilMailMimeSenderUser:
+ Collaboration diagram for ilMailMimeSenderUser:

Public Member Functions

 __construct (protected ilSetting $settings, protected ilObjUser $user, protected ilMustacheFactory $mustache_factory)
 
 hasReplyToAddress ()
 
 getReplyToAddress ()
 
 getReplyToName ()
 
 hasEnvelopFromAddress ()
 
 getEnvelopFromAddress ()
 
 getFromAddress ()
 
 getFromName ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailMimeSenderUser::__construct ( protected ilSetting  $settings,
protected ilObjUser  $user,
protected ilMustacheFactory  $mustache_factory 
)

Definition at line 27 of file class.ilMailMimeSenderUser.php.

31  {
32  }

Member Function Documentation

◆ getEnvelopFromAddress()

ilMailMimeSenderUser::getEnvelopFromAddress ( )

Implements ilMailMimeSender.

Definition at line 65 of file class.ilMailMimeSenderUser.php.

References ILIAS\Repository\settings().

65  : string
66  {
67  return $this->settings->get('mail_system_usr_env_from_addr', '');
68  }
+ Here is the call graph for this function:

◆ getFromAddress()

ilMailMimeSenderUser::getFromAddress ( )

Implements ilMailMimeSender.

Definition at line 70 of file class.ilMailMimeSenderUser.php.

References ILIAS\Repository\settings().

70  : string
71  {
72  return $this->settings->get('mail_system_usr_from_addr', '');
73  }
+ Here is the call graph for this function:

◆ getFromName()

ilMailMimeSenderUser::getFromName ( )

Implements ilMailMimeSender.

Definition at line 75 of file class.ilMailMimeSenderUser.php.

References ILIAS\Repository\settings(), and ILIAS\Repository\user().

75  : string
76  {
77  $from = $this->settings->get('mail_system_usr_from_name', '');
78  if ($from === '') {
79  return $this->user->getFullname();
80  }
81 
82  $placeholders = [
83  'FULLNAME' => $this->user->getFullname(),
84  'FIRSTNAME' => $this->user->getFirstname(),
85  'LASTNAME' => $this->user->getLastname(),
86  ];
87 
88  $template = $from;
89  $interpolated = $this->mustache_factory->getBasicEngine()->render($template, $placeholders);
90 
91  if ($template !== $interpolated) {
92  return $interpolated;
93  }
94 
95  return $template;
96  }
+ Here is the call graph for this function:

◆ getReplyToAddress()

ilMailMimeSenderUser::getReplyToAddress ( )

Implements ilMailMimeSender.

Definition at line 39 of file class.ilMailMimeSenderUser.php.

References ILIAS\Repository\settings(), and ILIAS\Repository\user().

39  : string
40  {
41  if (
42  (bool) $this->settings->get('use_global_reply_to_addr', '0') &&
43  is_string($this->settings->get('global_reply_to_addr', '')) &&
44  $this->settings->get('global_reply_to_addr', '') !== ''
45  ) {
46  return $this->settings->get('global_reply_to_addr', '');
47  }
48 
49  return $this->user->getEmail();
50  }
+ Here is the call graph for this function:

◆ getReplyToName()

ilMailMimeSenderUser::getReplyToName ( )

Implements ilMailMimeSender.

Definition at line 52 of file class.ilMailMimeSenderUser.php.

References ILIAS\Repository\user().

52  : string
53  {
54  return $this->user->getFullname();
55  }
+ Here is the call graph for this function:

◆ hasEnvelopFromAddress()

ilMailMimeSenderUser::hasEnvelopFromAddress ( )

Implements ilMailMimeSender.

Definition at line 57 of file class.ilMailMimeSenderUser.php.

References null, and ILIAS\Repository\settings().

57  : bool
58  {
59  return $this->settings->get('mail_system_usr_env_from_addr', '') !== '' && $this->settings->get(
60  'mail_system_usr_env_from_addr',
61  ''
62  ) !== null;
63  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ hasReplyToAddress()

ilMailMimeSenderUser::hasReplyToAddress ( )

Implements ilMailMimeSender.

Definition at line 34 of file class.ilMailMimeSenderUser.php.

34  : bool
35  {
36  return true;
37  }

The documentation for this class was generated from the following file: