ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification Class Reference
+ Inheritance diagram for ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification:
+ Collaboration diagram for ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification:

Public Member Functions

 send ()
 
- Public Member Functions inherited from ilMimeMailNotification
 __construct (bool $a_is_personal_workspace=false)
 
 sendMimeMail (string $a_rcp)
 
 setCurrentRecipient (string $current_recipient)
 
 getCurrentRecipient ()
 
 setMimeMail (ilMimeMail $mime_mail)
 
 getMimeMail ()
 
- Public Member Functions inherited from ilMailNotification
 __construct (protected bool $is_in_wsp=false)
 
 setType (int $a_type)
 
 getType ()
 
 setSender (int $a_usr_id)
 
 getSender ()
 
 setRecipients (array $a_rcp)
 
 getRecipients ()
 
 setAttachments (array $a_att)
 
 getAttachments ()
 
 setLangModules (array $a_modules)
 
 getUserLanguage (int $a_usr_id)
 
 setRefId (int $a_id)
 
 getRefId ()
 
 getObjId ()
 
 setObjId (int $a_obj_id)
 
 getObjType ()
 
 setAdditionalInformation (array $a_info)
 
 getAdditionalInformation ()
 
 sendMail (array $a_rcp, bool $a_parse_recipients=true)
 
 getBlockBorder ()
 

Protected Member Functions

 initLanguageByIso2Code (string $a_code='')
 
- Protected Member Functions inherited from ilMimeMailNotification
 setSubject (string $a_subject)
 
 initMimeMail ()
 
 initLanguageByIso2Code (string $a_code='')
 
 initLanguage (int $a_usr_id)
 
- Protected Member Functions inherited from ilMailNotification
 setSubject (string $a_subject)
 
 getSubject ()
 
 setBody (string $a_body)
 
 appendBody (string $a_body)
 
 getBody ()
 
 initLanguage (int $a_usr_id)
 
 initLanguageByIso2Code (string $a_code='')
 
 setLanguage (ilLanguage $a_language)
 
 getLanguage ()
 
 getLanguageText (string $a_keyword)
 
 getObjectTitle (bool $a_shorten=false)
 
 initMail ()
 
 getMail ()
 
 createPermanentLink (array $a_params=[], string $a_append='')
 
 userToString (int $a_usr_id)
 
 isRefIdAccessible (int $a_user_id, int $a_ref_id, string $a_permission='read')
 

Private Member Functions

 buildFolderTitle (FolderDto $folder_object)
 

Additional Inherited Members

- Data Fields inherited from ilMailNotification
final const int SUBJECT_TITLE_LENGTH = 60
 
- Protected Attributes inherited from ilMimeMailNotification
ilMimeMail $mime_mail
 
string $current_recipient
 
ilMailMimeSenderFactory $sender_factory
 
- Protected Attributes inherited from ilMailNotification
int $type
 
int $sender
 
ilMail $mail = null
 
string $subject = ''
 
string $body = ''
 
array $attachments = []
 
ilLanguage $language
 
array $lang_modules = []
 
array $recipients = []
 
int $ref_id
 
int $obj_id = 0
 
string $obj_type = ''
 
array $additional_info = []
 
ilWorkspaceTree $wsp_tree
 
ilWorkspaceAccessHandler $wsp_access_handler
 

Detailed Description

Definition at line 27 of file MailNotification.php.

Member Function Documentation

◆ buildFolderTitle()

ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification::buildFolderTitle ( FolderDto  $folder_object)
private

Definition at line 29 of file MailNotification.php.

29 : string
30 {
31 $folder_title = $folder_object->getFolderTitle();
32 $folder_translation = $this->getLanguage()->txt('deleted');
33
34 if ($folder_title !== null && $folder_title !== '') {
35 $lang_key = 'mail_' . $folder_title;
36 $folder_translation = $this->getLanguage()->txt($lang_key);
37
38 if ($folder_translation === '-' . $lang_key . '-') {
39 $folder_translation = $folder_title;
40 }
41 }
42
43 return $folder_translation;
44 }

References ILIAS\Mail\Cron\ExpiredOrOrphanedMails\FolderDto\getFolderTitle(), and ilMailNotification\getLanguage().

+ Here is the call graph for this function:

◆ initLanguageByIso2Code()

ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification::initLanguageByIso2Code ( string  $a_code = '')
protected

Reimplemented from ilMimeMailNotification.

Definition at line 46 of file MailNotification.php.

46 : void
47 {
48 parent::initLanguageByIso2Code($a_code);
49 $this->getLanguage()->loadLanguageModule('user');
50 }

References ilMailNotification\getLanguage().

Referenced by ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\send().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send()

ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification::send ( )

Definition at line 52 of file MailNotification.php.

52 : void
53 {
54 foreach ($this->getRecipients() as $rcp) {
55 try {
56 $this->handleCurrentRecipient($rcp);
57 } catch (ilMailException) {
58 continue;
59 }
60 $this->initMimeMail();
62 $this->setSubject($this->getLanguage()->txt('orphaned_mail_subject'));
63
65 $this->appendBody("\n\n");
66 $this->appendBody($this->getLanguage()->txt('orphaned_mail_body'));
67 $this->appendBody("\n\n");
68
69 $this->appendOrphanedMailsBody();
70
72 $this->sendMimeMail($this->getCurrentRecipient());
73 }
74 }
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
static _getInstallationSignature()

References ilMail\_getInstallationSignature(), ilMailNotification\appendBody(), ilMimeMailNotification\getCurrentRecipient(), ilMailNotification\getLanguage(), ilMailNotification\getRecipients(), ilMail\getSalutation(), ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\initLanguageByIso2Code(), ilMimeMailNotification\initMimeMail(), ilMimeMailNotification\sendMimeMail(), and ilMimeMailNotification\setSubject().

+ Here is the call graph for this function:

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