[0005735] Problems with sending emails with encoding other than ASCII - fixed.
[fa-stable.git] / inventory / includes / inventory_db.inc
index df25675516832e4ba3361dfb3c2e7fe8d1a06c0c..ddc817ad3bdb30848a2621ebba799e05bcf00568 100644 (file)
@@ -94,14 +94,13 @@ function send_reorder_email($loc, $st_ids, $st_names, $st_num, $st_reorder)
        require_once($path_to_root . "/reporting/includes/class.mail.inc");
        $company = get_company_prefs();
        $mail = new email($company['coy_name'], $company['email']);
-       $to = $loc['location_name'] . " <" . $loc['email'] . ">";
        $subject = _("Stocks below Re-Order Level at ") . $loc['location_name'];
        $msg = "\n";
        for ($i = 0; $i < count($st_ids); $i++)
                $msg .= $st_ids[$i] . " " . $st_names[$i] . ", " . _("Re-Order Level") . ": " . $st_reorder[$i] . ", " . _("Below") . ": " . $st_num[$i] . "\n";
        $msg .= "\n" . _("Please reorder") . "\n\n";
        $msg .= $company['coy_name'];
-       $mail->to($to);
+       $mail->to($loc['location_name'], $loc['email']);
        $mail->subject($subject);
        $mail->text($msg);
        return $mail->send();