X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=blobdiff_plain;f=reporting%2Fincludes%2Fpdf_report.inc;fp=reporting%2Fincludes%2Fpdf_report.inc;h=a803fe3f9a640a030b8f7208d16400a8d5c00d5d;hp=ecb31b0e46a5c3620bf1d3b2b08a9600f75d6f68;hb=0cbe5791fbc7f09ab9dda6b92d1ae27e61d26953;hpb=331673104c056da093f60cde57d731371fbdc6ee diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index ecb31b0e..a803fe3f 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -998,14 +998,13 @@ class FrontReport extends Cpdf continue; $emailtype = true; $this->SetLang($contact['lang']); + $coy_name = @html_entity_decode($this->company['coy_name'], ENT_QUOTES, $_SESSION['language']->encoding=='iso-8859-2' ? 'ISO-8859-1' : $_SESSION['language']->encoding); require_once($path_to_root . "/reporting/includes/class.mail.inc"); - $mail = new email(str_replace(",", "", $this->company['coy_name']), + $mail = new email(str_replace(",", "", $coy_name), $this->company['email']); $mail->charset = $this->encoding; - $to = str_replace(",", "", $contact['name'].' '.$contact['name2']) - ." <" . $contact['email'] . ">"; $msg = _("Dear") . " " . $contact['name2'] . ",\n\n" . _("Attached you will find ") . " " . $subject ."\n\n"; @@ -1024,8 +1023,9 @@ class FrontReport extends Cpdf } $msg .= _("Kindest regards") . "\n\n"; - $sender = $this->user . "\n" . $this->company['coy_name'] . "\n" . $this->company['postal_address'] . "\n" . $this->company['email'] . "\n" . $this->company['phone']; - $mail->to($to); $try++; + $sender = $this->user . "\n" . $coy_name . "\n" . $this->company['postal_address'] . "\n" . $this->company['email'] . "\n" . $this->company['phone']; + $mail->to(str_replace(",", "", $contact['name'].' '.$contact['name2']), $contact['email']); + $try++; $mail->subject($subject); $mail->text($msg . $sender); $mail->attachment($fname, $this->filename);