ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilMailCronOrphanedMailsNotification Class Reference

Class ilMailCronOrphanedMailsNotification. More...

+ Inheritance diagram for ilMailCronOrphanedMailsNotification:
+ Collaboration diagram for ilMailCronOrphanedMailsNotification:

Public Member Functions

 __construct ()
 
 send ()
 
 getOrphandMailsBody ()
 
- Public Member Functions inherited from ilMimeMailNotification
 sendMimeMail ($a_rcp)
 
 setCurrentRecipient ($current_recipient)
 
 getCurrentRecipient ()
 
 setMimeMail ($mime_mail)
 
 getMimeMail ()
 
- Public Member Functions inherited from ilMailNotification
 __construct ($a_is_personal_workspace=false)
 
 setType ($a_type)
 Set notification type. More...
 
 getType ()
 Get notification type. More...
 
 setSender ($a_usr_id)
 Set sender of mail. More...
 
 getSender ()
 get sender of mail More...
 
 setRecipients (array $a_rcp)
 
 getRecipients ()
 get array of recipients More...
 
 setAttachments ($a_att)
 Set attachments
More...
 
 getAttachments ()
 Get attachments
More...
 
 setLangModules (array $a_modules)
 Set lang modules. More...
 
 getUserLanguage ($a_usr_id)
 Get user language. More...
 
 setRefId ($a_id)
 
 getRefId ()
 
 getObjId ()
 
 setObjId ($a_obj_id)
 
 getObjType ()
 Get object type. More...
 
 setAdditionalInformation (array $a_info)
 Additional information for creating notification mails. More...
 
 getAdditionalInformation ()
 
 sendMail (array $a_rcp, $a_type, $a_parse_recipients=true)
 
 getBlockBorder ()
 Get (ascii) block border. More...
 

Protected Member Functions

 initLanguageByIso2Code ($a_code='')
 
- Protected Member Functions inherited from ilMimeMailNotification
 initLanguageByIso2Code ($a_code='')
 
 initLanguage ($a_usr_id)
 
- Protected Member Functions inherited from ilMailNotification
 setSubject ($a_subject)
 
 getSubject ()
 
 setBody ($a_body)
 
 appendBody ($a_body)
 Append body text. More...
 
 getBody ()
 
 initLanguage ($a_usr_id)
 Init language. More...
 
 initLanguageByIso2Code ($a_code='')
 Init language by ISO2 code. More...
 
 setLanguage ($a_language)
 
 getLanguage ()
 
 getLanguageText ($a_keyword)
 
 getObjectTitle ($a_shorten=false)
 
 initMail ()
 
 getMail ()
 
 createPermanentLink ($a_params=array(), $a_append='')
 
 userToString ($a_usr_id)
 
 isRefIdAccessible ($a_user_id, $a_ref_id, $a_permission="read")
 Check if ref id is accessible for user. More...
 

Additional Inherited Members

- Data Fields inherited from ilMailNotification
const SUBJECT_TITLE_LENGTH = 60
 
- Protected Attributes inherited from ilMimeMailNotification
 $mime_mail
 
 $current_recipient
 
- Protected Attributes inherited from ilMailNotification
 $type = null
 
 $sender = null
 
 $mail = null
 
 $subject = ''
 
 $body = ''
 
 $attachments = array()
 
 $language = null
 
 $lang_modules = array()
 
 $recipients = array()
 
 $ref_id = null
 
 $obj_id = null
 
 $obj_type = null
 
 $additional_info = array()
 
 $is_in_wsp
 
 $wsp_tree
 
 $wsp_access_handler
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailCronOrphanedMailsNotification::__construct ( )

Definition at line 16 of file class.ilMailCronOrphanedMailsNotification.php.

17 {
18 parent::__construct();
19 }

Member Function Documentation

◆ getOrphandMailsBody()

ilMailCronOrphanedMailsNotification::getOrphandMailsBody ( )

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

62 {
63 $additional_information = $this->getAdditionalInformation();
64 $mail_folders = $additional_information['mail_folders'];
65
66 foreach($mail_folders as $folder_object)
67 {
68 $folder_title = $this->getLanguage()->txt('mail_'.$folder_object->getFolderTitle());
69 $this->appendBody($folder_title.':');
70 $this->appendBody("\n");
71 foreach($folder_object->getOrphanedMailObjects() as $mail_object)
72 {
73 $this->appendBody($mail_object->getMailSubject());
74 $this->appendBody("\n");
75 }
76 }
77 }
appendBody($a_body)
Append body text.

References ilMailNotification\appendBody(), ilMailNotification\getAdditionalInformation(), and ilMailNotification\getLanguage().

Referenced by send().

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

◆ initLanguageByIso2Code()

ilMailCronOrphanedMailsNotification::initLanguageByIso2Code (   $a_code = '')
protected
Parameters
string$a_code

Reimplemented from ilMimeMailNotification.

Definition at line 24 of file class.ilMailCronOrphanedMailsNotification.php.

25 {
26 parent::initLanguageByIso2Code($a_code);
27 $this->getLanguage()->loadLanguageModule('user');
28 }

References ilMailNotification\getLanguage().

Referenced by send().

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

◆ send()

ilMailCronOrphanedMailsNotification::send ( )

Definition at line 33 of file class.ilMailCronOrphanedMailsNotification.php.

34 {
35 foreach($this->getRecipients() as $rcp)
36 {
37 try
38 {
39 $this->handleCurrentRecipient($rcp);
40 }
41 catch(ilMailException $e)
42 {
43 continue;
44 }
45 $this->initMimeMail();
47 $this->setSubject($this->getLanguage()->txt('orphaned_mail_subject'));
48
50 $this->appendBody("\n\n");
51 $this->appendBody($this->getLanguage()->txt('orphaned_mail_body'));
52 $this->appendBody("\n\n");
53
54 $body = $this->getOrphandMailsBody();
55 $this->appendBody($body);
57 $this->sendMimeMail($this->getCurrentRecipient());
58 }
59 }
ILIAS Exception for Service Mail.
getRecipients()
get array of recipients
static getSalutation($a_usr_id, $a_language=null)
Get salutation.
static _getInstallationSignature()
Static getter for the installation signature.

References ilMailNotification\$body, ilMail\_getInstallationSignature(), ilMailNotification\appendBody(), ilMimeMailNotification\getCurrentRecipient(), ilMailNotification\getLanguage(), getOrphandMailsBody(), ilMailNotification\getRecipients(), ilMail\getSalutation(), initLanguageByIso2Code(), ilMimeMailNotification\sendMimeMail(), and ilMailNotification\setSubject().

+ Here is the call graph for this function:

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