4 include_once
'./Services/Mail/classes/class.ilMailNotification.php';
6 include_once
'Services/Mail/classes/class.ilMimeMail.php';
7 include_once
'Services/Mail/classes/class.ilMail.php';
22 parent::__construct($a_is_personal_workspace);
29 $is_message_enabled = $ilSetting->get(
"mail_notification_message");
31 $res = $ilDB->queryF(
'SELECT mail.* FROM mail_options 32 INNER JOIN mail ON mail.user_id = mail_options.user_id 33 INNER JOIN mail_obj_data ON mail_obj_data.obj_id = mail.folder_id 34 INNER JOIN usr_data ud ON ud.usr_id = mail.user_id 35 WHERE mail_options.cronjob_notification = %s 36 AND mail.send_time >= %s 37 AND mail.m_status = %s 39 array(
'integer',
'timestamp',
'text',
'integer'),
40 array(1,
date(
'Y-m-d H:i:s',
time() - 60 * 60 * 24),
'unread', 1)
46 while(
$row = $ilDB->fetchAssoc(
$res))
48 if($user_id == 0 ||
$row[
'user_id'] != $user_id)
50 $user_id =
$row[
'user_id'];
52 $users[$user_id][] =
$row;
55 foreach($users as $user_id => $mail_data)
67 if(count($mail_data) == 1)
78 foreach($mail_data as
$mail)
80 $this->
appendBody(
"----------------------------------------------------------------------------------------------");
83 $this->
appendBody($user_lang->txt(
'date') .
": ".$mail[
'send_time']);
85 if($mail[
'sender_id'] == ANONYMOUS_USER_ID)
87 $sender = ilMail::_getIliasMailerName();
95 $this->
appendBody($user_lang->txt(
'subject').
": ". $mail[
'm_subject']);
98 if($is_message_enabled ==
true)
100 $this->
appendBody($user_lang->txt(
'message').
": ". $mail[
'm_message']);
105 $this->
appendBody(
"----------------------------------------------------------------------------------------------");
107 $this->
appendBody($user_lang->txt(
'follow_link_to_read_mails').
" ");
110 $mailbox_link .=
"/goto.php?target=mail&client_id=".CLIENT_ID;
115 $this->
appendBody(ilMail::_getInstallationSignature());
118 $mmail->autoCheck(
false);
119 $mmail->From(ilMail::getIliasMailerAddress());
123 $mmail->Body($this->
getBody());
static _lookupLogin($a_user_id)
lookup login
getLanguageText($a_keyword)
initLanguage($a_usr_id)
Init language.
__construct($a_is_personal_workspace=false)
{}
Base class for course/group mail notifications.
this class encapsulates the PHP mail() function.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.
setRecipients(array $a_rcp)
static _lookupEmail($a_user_id)
Lookup email.
appendBody($a_body)
Append body text.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.