Lines Matching defs:text

25     protected $text      = '';
33 protected $replacements = ['text' => [], 'html' => []];
188 * Set the text and HTML body and apply replacements
196 * @param string $text plain text body
197 * @param array $textrep replacements to apply on the text part
199 * @param string $html the HTML body, leave null to create it from $text
202 public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true)
208 // create HTML from text if not given
210 $html = $text;
222 if (strpos($text, '@EMAILSIGNATURE@') === false) {
223 $text .= '@EMAILSIGNATURE@';
244 $trep = array_merge($this->replacements['text'], $textrep);
249 $text = str_replace('@' . strtoupper($key) . '@', $substitution, $text);
256 $this->setText($text);
274 * Set the plain text part of the mail
278 * @param string $text
280 public function setText($text)
282 $this->text = $text;
397 $text = trim($matches[1]);
400 $text = '';
419 // text was given
420 if (!empty($text) && !isWindows()) { // No named recipients for To: in Windows (see FS#652)
425 $text = Clean::deaccent($text);
426 $text = Clean::strip($text);
429 if (strpos($text, ',') !== false || !Clean::isASCII($text)) {
430 $text = '=?UTF-8?B?' . base64_encode($text) . '?=';
433 $text = '';
440 $headers .= $text . ' ' . $addr;
506 if (!$this->text && !$this->html) {
516 $this->headers['Content-Type'] = 'text/plain; charset=UTF-8';
518 $body .= chunk_split(base64_encode($this->text), 72, MAILHEADER_EOL);
525 // do we have alternative text content?
526 if ($this->text && $this->html) {
530 $body .= 'Content-Type: text/plain; charset=UTF-8' . MAILHEADER_EOL;
533 $body .= chunk_split(base64_encode($this->text), 72, MAILHEADER_EOL);
537 ' type="text/html"' . MAILHEADER_EOL;
542 $body .= 'Content-Type: text/html; charset=UTF-8' . MAILHEADER_EOL;
551 if ($this->text && $this->html) {
665 $this->replacements['text'] = [
679 $this->replacements['text']['DOKUWIKIURL'],
682 $this->replacements['text']['EMAILSIGNATURE'] = "\n-- \n" . $signature . "\n";
730 'body' => &$this->text,