Definition at line 23 of file class.ilMimeMail.php.
◆ __construct()
ilMimeMail::__construct |
( |
| ) |
|
◆ Attach()
ilMimeMail::Attach |
( |
string |
$filename, |
|
|
string |
$file_type = '' , |
|
|
string |
$disposition = 'inline' , |
|
|
?string |
$display_name = null |
|
) |
| |
- Parameters
-
string | $filename | Path of the file to attach |
string | $file_type | MIME-type of the file. default to 'application/x-unknown-content-type' |
string | $disposition | Instruct the Mailclient to display the file if possible ("inline") or always as a link ("attachment") possible values are "inline", "attachment" |
string | null | $display_name | Filename to use in email (if different from source file) |
Definition at line 178 of file class.ilMimeMail.php.
References $filename.
184 if ($file_type ===
'') {
185 $file_type =
'application/octet-stream';
189 $this->actype[] = $file_type;
190 $this->adispo[] = $disposition;
191 $this->adisplay[] = $display_name;
◆ Bcc()
- Parameters
-
string|string[] | $bcc BCC email address, accept both a single address or an array of addresses |
Definition at line 118 of file class.ilMimeMail.php.
120 if (is_array($bcc)) {
123 $this->abcc[] = $bcc;
◆ Body()
ilMimeMail::Body |
( |
string |
$body | ) |
|
◆ build()
◆ buildBodyMultiParts()
ilMimeMail::buildBodyMultiParts |
( |
string |
$skin | ) |
|
|
protected |
Definition at line 252 of file class.ilMimeMail.php.
References getHtmlEnvelope(), and ILIAS\Repository\refinery().
Referenced by build().
254 if ($this->body ===
'') {
258 if (strip_tags($this->body,
'<b><u><i><a>') === $this->body) {
262 $this->finalBodyAlt = strip_tags($this->body);
263 $this->body = $this->
refinery->string()->makeClickable()->transform(nl2br($this->body));
266 $this->finalBodyAlt = strip_tags(str_ireplace([
"<br />",
"<br>",
"<br/>"],
"\n", $this->body));
269 $this->finalBody = str_replace(
'{PLACEHOLDER}', $this->body, $this->
getHtmlEnvelope($skin));
getHtmlEnvelope(string $skin)
◆ buildHtmlInlineImages()
ilMimeMail::buildHtmlInlineImages |
( |
string |
$skin | ) |
|
|
protected |
Definition at line 287 of file class.ilMimeMail.php.
Referenced by build().
289 $this->gatherImagesFromDirectory(
'./Services/Mail/templates/default/img');
291 if ($skin !==
'default') {
292 $skinDirectory =
'./Customizing/global/skin/' . $skin .
'/Services/Mail/img';
293 if (is_dir($skinDirectory) && is_readable($skinDirectory)) {
294 $this->gatherImagesFromDirectory($skinDirectory,
true);
◆ Cc()
- Parameters
-
string|string[] | $cc CC email address, accept both a single address or an array of addresses |
Definition at line 106 of file class.ilMimeMail.php.
◆ From()
◆ getAttachments()
ilMimeMail::getAttachments |
( |
| ) |
|
- Returns
- array{path: string, name: string}[]
Definition at line 197 of file class.ilMimeMail.php.
References $i, and $name.
Referenced by ilMailMimeTransportBase\send().
202 foreach ($this->aattach as $attachment) {
204 if (isset($this->adisplay[
$i]) && is_string($this->adisplay[$i]) && $this->adisplay[$i] !==
'') {
209 'path' => $attachment,
◆ getBcc()
◆ getCc()
◆ getDefaultTransport()
static ilMimeMail::getDefaultTransport |
( |
| ) |
|
|
static |
◆ getFinalBody()
ilMimeMail::getFinalBody |
( |
| ) |
|
◆ getFinalBodyAlt()
ilMimeMail::getFinalBodyAlt |
( |
| ) |
|
◆ getFrom()
◆ getHtmlEnvelope()
ilMimeMail::getHtmlEnvelope |
( |
string |
$skin | ) |
|
|
protected |
Definition at line 272 of file class.ilMimeMail.php.
Referenced by buildBodyMultiParts().
274 $bracket_path =
'./Services/Mail/templates/default/tpl.html_mail_template.html';
276 if ($skin !==
'default') {
277 $tplpath =
'./Customizing/global/skin/' . $skin .
'/Services/Mail/tpl.html_mail_template.html';
279 if (is_file($tplpath)) {
280 $bracket_path =
'./Customizing/global/skin/' . $skin .
'/Services/Mail/tpl.html_mail_template.html';
284 return file_get_contents($bracket_path);
◆ getImages()
ilMimeMail::getImages |
( |
| ) |
|
- Returns
- array{path: string, cid: string, name: string}[] An array of images. Each element must container to associative keys, 'path', 'cid' and 'name'
Definition at line 222 of file class.ilMimeMail.php.
Referenced by ilMailMimeTransportBase\send().
224 return array_values($this->images);
◆ getSubject()
ilMimeMail::getSubject |
( |
| ) |
|
◆ getTo()
◆ removeHTMLTags()
ilMimeMail::removeHTMLTags |
( |
string |
$maybeHTML | ) |
|
|
private |
Definition at line 245 of file class.ilMimeMail.php.
Referenced by build().
247 $maybeHTML = str_ireplace([
'<br />',
'<br>',
'<br/>'],
"\n", $maybeHTML);
249 return strip_tags($maybeHTML);
◆ Send()
Definition at line 320 of file class.ilMimeMail.php.
References build().
323 $transport = self::getDefaultTransport();
328 return $transport->
send($this);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ setDefaultTransport()
◆ Subject()
ilMimeMail::Subject |
( |
string |
$subject, |
|
|
bool |
$addPrefix = false , |
|
|
string |
$contextPrefix = '' |
|
) |
| |
◆ To()
- Parameters
-
string|string[] | $to To email address, accept both a single address or an array of addresses |
Definition at line 94 of file class.ilMimeMail.php.
99 $this->sendto[] = $to;
◆ $aattach
array ilMimeMail::$aattach = [] |
|
protected |
◆ $abcc
array ilMimeMail::$abcc = [] |
|
protected |
◆ $acc
array ilMimeMail::$acc = [] |
|
protected |
◆ $actype
array ilMimeMail::$actype = [] |
|
protected |
◆ $adisplay
array ilMimeMail::$adisplay = [] |
|
protected |
◆ $adispo
array ilMimeMail::$adispo = [] |
|
protected |
◆ $body
string ilMimeMail::$body = '' |
|
protected |
◆ $defaultTransport
◆ $finalBody
string ilMimeMail::$finalBody = '' |
|
protected |
◆ $finalBodyAlt
string ilMimeMail::$finalBodyAlt = '' |
|
protected |
◆ $images
array ilMimeMail::$images = [] |
|
protected |
◆ $refinery
Refinery ilMimeMail::$refinery |
|
private |
◆ $sender
◆ $sendto
array ilMimeMail::$sendto = [] |
|
protected |
◆ $settings
◆ $subject
string ilMimeMail::$subject = '' |
|
protected |
◆ $subjectBuilder
◆ MAIL_SUBJECT_PREFIX
const ilMimeMail::MAIL_SUBJECT_PREFIX = '[ILIAS]' |
The documentation for this class was generated from the following file: