ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilMailMimeSenderUser Class Reference
+ 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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

27  {
28  }

Member Function Documentation

◆ getEnvelopFromAddress()

ilMailMimeSenderUser::getEnvelopFromAddress ( )

Implements ilMailMimeSender.

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

References ILIAS\Repository\settings().

61  : string
62  {
63  return $this->settings->get('mail_system_usr_env_from_addr', '');
64  }
+ Here is the call graph for this function:

◆ getFromAddress()

ilMailMimeSenderUser::getFromAddress ( )

Implements ilMailMimeSender.

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

References ILIAS\Repository\settings().

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

◆ getFromName()

ilMailMimeSenderUser::getFromName ( )

Implements ilMailMimeSender.

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

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

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

◆ getReplyToAddress()

ilMailMimeSenderUser::getReplyToAddress ( )

Implements ilMailMimeSender.

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

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

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

◆ getReplyToName()

ilMailMimeSenderUser::getReplyToName ( )

Implements ilMailMimeSender.

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

References ILIAS\Repository\user().

48  : string
49  {
50  return $this->user->getFullname();
51  }
+ Here is the call graph for this function:

◆ hasEnvelopFromAddress()

ilMailMimeSenderUser::hasEnvelopFromAddress ( )

Implements ilMailMimeSender.

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

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

53  : bool
54  {
55  return $this->settings->get('mail_system_usr_env_from_addr', '') !== '' && $this->settings->get(
56  'mail_system_usr_env_from_addr',
57  ''
58  ) !== null;
59  }
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 30 of file class.ilMailMimeSenderUser.php.

30  : bool
31  {
32  return true;
33  }

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