Bug sending email from/to a name with commas. Has been replaced with ''
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 2 Mar 2010 12:00:30 +0000 (12:00 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 2 Mar 2010 12:00:30 +0000 (12:00 +0000)
CHANGELOG.txt
reporting/includes/pdf_report.inc

index 418aca8b3e05ad759dc5b2881bab2344a70cdc35..30549ad99a64afdc32ddc0c3ab8c500c3ade3a17 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+02-Mar-2010 Joe Hunt
+# Bug sending email to a name with commas. Has been replaced with ''.
+$ /reporting/includes/pdf_report.inc
+
 01-Mar-2010 Janusz Dobrowolski
 # [0000212] Selecting branch from popup was not working.
 $ /sales/manage/customer_branches.php
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