Lines Matching defs:headers

22     protected $headers   = [];
59 // add some default headers for mailfiltering FS#2247
168 if (isset($this->headers[$header])) unset($this->headers[$header]);
170 $this->headers[$header] = $value;
339 $this->headers['Subject'] = $subject;
364 * for headers. Addresses may not contain Non-ASCII data!
380 $headers = '';
437 if ($headers != '') {
438 $headers .= ', ';
440 $headers .= $text . ' ' . $addr;
443 $headers = trim($headers);
444 if (empty($headers)) return false;
446 return $headers;
482 $mime .= MAILHEADER_EOL; //end of headers
510 // add general headers
511 $this->headers['MIME-Version'] = '1.0';
516 $this->headers['Content-Type'] = 'text/plain; charset=UTF-8';
517 $this->headers['Content-Transfer-Encoding'] = 'base64';
527 $this->headers['Content-Type'] = 'multipart/alternative;' . MAILHEADER_EOL .
560 * Cleanup and encode the headers array
567 if (empty($this->headers['From'])) $this->from($conf['mailfrom']);
570 if (isset($this->headers[$addr])) {
571 $this->headers[$addr] = $this->cleanAddress($this->headers[$addr]);
575 if (isset($this->headers['Subject'])) {
586 if (!str_starts_with($this->headers['Subject'], $prefix)) {
587 $this->headers['Subject'] = $prefix . ' ' . $this->headers['Subject'];
592 $this->headers['Subject'] = Clean::deaccent($this->headers['Subject']);
593 $this->headers['Subject'] = Clean::strip($this->headers['Subject']);
595 if (!Clean::isASCII($this->headers['Subject'])) {
596 $this->headers['Subject'] = '=?UTF-8?B?' . base64_encode($this->headers['Subject']) . '?=';
614 * Create a string from the headers array
616 * @returns string the headers
620 $headers = '';
621 foreach ($this->headers as $key => $val) {
623 $headers .= $this->wrappedHeaderLine($key, $val);
625 return $headers;
629 * return a full email with all headers
641 $headers = $this->prepareHeaders();
643 return $headers . MAILHEADER_EOL . $body;
725 'to' => &$this->headers['To'],
726 'cc' => &$this->headers['Cc'],
727 'bcc' => &$this->headers['Bcc'],
728 'from' => &$this->headers['From'],
729 'subject' => &$this->headers['Subject'],
732 'headers' => '', // plugins shouldn't use this
740 // clean up before using the headers
745 trim($this->headers['To']) === '' &&
746 trim($this->headers['Cc']) === '' &&
747 trim($this->headers['Bcc']) === ''
751 if (array_key_exists('To', $this->headers)) {
752 $to = (string)$this->headers['To'];
753 unset($this->headers['To']);
759 if (array_key_exists('Subject', $this->headers)) {
760 $subject = (string)$this->headers['Subject'];
761 unset($this->headers['Subject']);
770 // cook the headers
771 $headers = $this->prepareHeaders();
772 // add any headers set by legacy plugins
773 if (trim($data['headers'])) {
774 $headers .= MAILHEADER_EOL . trim($data['headers']);
788 $success = @mail($to, $subject, $body, $headers);
790 $success = @mail($to, $subject, $body, $headers, $this->sendparam);