34 $this->lang_variables_as_fallback = $a_status;
63 $this->
data = $a_data;
79 if (!is_array($this->amail[$a_lang])) {
80 require_once(
'./Services/WebDAV/classes/class.ilObjDiskQuotaSettings.php');
82 $this->amail[
"body"] = trim($this->amail[
"body"]);
83 $this->amail[
"subject"] = trim($this->amail[
"subject"]);
86 return $this->amail[$a_lang];
97 public function send()
104 if ($amail[
'body'] ==
'' || $amail[
'subject'] ==
'') {
106 $lang = $DIC->settings()->get(
'language');
113 ($amail[
'body'] ==
'' || $amail[
'subject'] ==
'')) {
118 $mail_subject = $tmp_lang->txt(
'disk_quota_mail_subject');
121 $mail_body = $tmp_lang->txt(
'disk_quota_mail_body_salutation') .
' ' .
$data[
'firstname'] .
' ' .
$data[
'lastname'] .
",\n\n" .
122 $tmp_lang->txt(
'disk_quota_body_text1') .
"\n\n" .
123 $tmp_lang->txt(
'disk_quota_body_text2') .
"\n" .
124 ILIAS_HTTP_PATH .
'/login.php?client_id=' . CLIENT_ID .
"\n";
125 $mail_body .= $tmp_lang->txt(
'login') .
': ' .
$data[
'firstname'] .
"\n";
127 $mail_body .= $tmp_lang->txt(
'disk_quota_mail_body_text3') .
"\n\r";
136 $senderFactory =
$GLOBALS[
"DIC"][
"mail.mime.sender.factory"];
139 include_once
'Services/Mail/classes/class.ilMimeMail.php';
141 $mmail->From($senderFactory->system());
142 $mmail->Subject($mail_subject);
143 $mmail->To($this->
data[
'email']);
144 $mmail->Body($mail_body);
147 include_once
'Services/Mail/classes/class.ilMail.php';
149 $mail->sendMail($this->
data[
'login'],
"",
"", $mail_subject, $mail_body, array(), array(
"normal"));
158 if ($this->tmp_lng == null || $this->tmp_lng->lang_key != $a_lang) {
168 $tmp_lang = $this->
getLng($a_lang);
171 switch ($this->
data[
'gender']) {
172 case "f": $gender_salut = $a_amail[
"sal_f"];
174 case "m": $gender_salut = $a_amail[
"sal_m"];
176 default: $gender_salut = $a_amail[
"sal_g"];
178 $gender_salut = trim($gender_salut);
180 $a_string = str_replace(
"[MAIL_SALUTATION]", $gender_salut, $a_string);
181 $a_string = str_replace(
"[LOGIN]", $this->
data[
'login'], $a_string);
182 $a_string = str_replace(
"[FIRST_NAME]", $this->
data[
'firstname'], $a_string);
183 $a_string = str_replace(
"[LAST_NAME]", $this->
data[
'lastname'], $a_string);
185 $a_string = str_replace(
"[EMAIL]", $this->
data[
'email'], $a_string);
186 $a_string = str_replace(
188 ILIAS_HTTP_PATH .
"/login.php?client_id=" . CLIENT_ID,
191 $a_string = str_replace(
"[CLIENT_NAME]", CLIENT_NAME, $a_string);
192 $a_string = str_replace(
194 $DIC->settings()->get(
"admin_email"),
198 $a_string = str_replace(
"[DISK_QUOTA]",
ilUtil::formatSize($this->
data[
'disk_quota'],
'short', $tmp_lang), $a_string);
199 $a_string = str_replace(
"[DISK_USAGE]",
ilUtil::formatSize($this->
data[
'disk_usage'],
'short', $tmp_lang), $a_string);
201 $disk_usage_details =
'';
202 foreach ($this->
data[
'disk_usage_details'] as $details) {
203 $disk_usage_details .= number_format($details[
'count'], 0) .
' ' .
204 $tmp_lang->txt($details[
'type']) .
' ' .
207 $a_string = str_replace(
"[DISK_USAGE_DETAILS]", $disk_usage_details, $a_string);
static _lookupReminderMailTemplate($a_lang)
Looks up the mail template for the specified language.
$lang_variables_as_fallback
readMailTemplate($a_lang)
get new mail template array (including subject and message body)
useLangVariablesAsFallback($a_status)
setData($a_data)
Sets used to fill in the placeholders in the mail.
Class ilDiskQuotaReminderMail.
replacePlaceholders($a_string, $a_amail, $a_lang)
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
static formatSize($size, $a_mode='short', $a_lng=null)
Returns the specified file size value in a human friendly form.
__construct()
constructor public
areLangVariablesUsedAsFallback()
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
$data
Data used to fill in the placeholders in the mail.