X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fclass.mail.inc;h=b1e29c145caacd7d1ceb03272b55ab62084f62f8;hb=e0544eddcab799b9088e0a774f63443e3f634bb6;hp=65066ca75fa8eb75ca4cbad1d3f6eaacc145f68e;hpb=fe435d21cfea6abb4166ca67ae9a0e3f76807c9d;p=fa-stable.git diff --git a/reporting/includes/class.mail.inc b/reporting/includes/class.mail.inc index 65066ca7..b1e29c14 100644 --- a/reporting/includes/class.mail.inc +++ b/reporting/includes/class.mail.inc @@ -39,11 +39,15 @@ class email var $subject = ""; var $body = ""; var $charset = 'ISO-8859-1'; + var $add_params; function email($name, $mail) { $this->boundary = md5(uniqid(time())); $this->header = "From: $name <$mail>\n"; + $bcc = get_company_pref('bcc_email'); + if ($bcc) + $this->bcc[] = $bcc; } function to($mail) @@ -132,9 +136,7 @@ class email } $this->header .= "\n"; } - $this->header .= "MIME-Version: 1.0\n"; $this->header .= "Content-Type: multipart/mixed;\n boundary=\"$this->boundary\"\n"; - $this->header .= "This is a multi-part message in MIME format.\n"; // Attachment hinzufügen $max = count($this->attachment); @@ -156,10 +158,10 @@ class email $ret = 0; foreach($this->to as $mail) { - if (mail($mail, $this->subject, $this->body, $this->header)) + if (mail($mail, $this->subject, $this->body, $this->header, $this->add_params)) $ret++; } return $ret; } } -?> \ No newline at end of file +?>