4 require_once
'Services/Mail/classes/Mime/Sender/interface.ilMailMimeSender.php';
44 if (!array_key_exists($usrId, self::$userInstances)) {
45 self::$userInstances[$usrId] = new \ilObjUser($usrId);
48 return new self(
$settings, self::$userInstances[$usrId]);
57 self::$userInstances[$usrId] =
$user;
67 $user = new \ilObjUser();
68 $user->setEmail($emailAddress);
86 return $this->
user->getEmail();
94 return $this->
user->getFullname();
102 return strlen($this->
settings->get(
'mail_system_usr_env_from_addr')) > 0;
110 return $this->
settings->get(
'mail_system_usr_env_from_addr');
118 return $this->
settings->get(
'mail_system_usr_from_addr');
127 if (0 == strlen(
$from)) {
128 return $this->
user->getFullname();
131 $name = str_ireplace(
'[FULLNAME]', $this->
user->getFullname(),
$from);
132 $name = str_ireplace(
'[FIRSTNAME]', $this->
user->getFirstname(),
$name);
133 $name = str_ireplace(
'[LASTNAME]', $this->
user->getLastname(),
$name);
134 if ($name !=
$from) {
static byUsrId(\ilSetting $settings, $usrId)
hasEnvelopFromAddress()
bool
Class ilMailMimeSenderSystem.
getEnvelopFromAddress()
string
static byEmailAddress(\ilSetting $settings, $emailAddress)
static addUserToCache($usrId, \ilObjUser $user)
Interface ilMailMimeTransport.
getReplyToAddress()
string
__construct(\ilSetting $settings, \ilObjUser $user)
ilMailMimeSenderSystem constructor.