Release 2.2.7
[fa-stable.git] / reporting / includes / pdf_report.inc
index 9c86c2ec949ce9966aca6ec2914c4af3e3f0d387..2dcafc5ca343966201e4c3f5d456a382631714d9 100644 (file)
@@ -926,10 +926,10 @@ class FrontReport extends Cpdf
                                        include("includes/doctext.inc");
                                }
                                require_once($path_to_root . "/reporting/includes/class.mail.inc");
-                       $mail = new email($this->company['coy_name'], $this->company['email']);
+                       $mail = new email(str_replace(",", "", $this->company['coy_name']), $this->company['email']);
                                if (!isset($myrow['email']) || $myrow['email'] == '') 
                                        $myrow['email'] = isset($myrow['contact_email']) ? $myrow['contact_email'] : '';
-                       $to = $myrow['DebtorName'] . " <" . $myrow['email'] . ">";
+                       $to = str_replace(",", "", $myrow['DebtorName']) . " <" . $myrow['email'] . ">";
                        $msg = $doc_Dear_Sirs . " " . $myrow['DebtorName'] . ",\n\n" . $doc_AttachedFile . " " . $subject .
                                "\n\n";
                                if (isset($myrow['dimension_id']) && $myrow['dimension_id'] > 0 && $doctype == ST_SALESINVOICE) // helper for payment links