Lines 100 - 117 in sales/includes/db/sales_order_db.inc
if ($loc_notification == 1 && count($st_ids) > 0)
{
require_once($path_to_root . "/reporting/includes/class.mail.inc");
$company = get_company_prefs();
$mail = new email($company['coy_name'], $company['email']);
$from = $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->subject($subject);
$mail->text($msg);
$ret = $mail->send();
}
The file class.mail.inc is included in only 2 files, one above and the other is reporting/includes/pdf_report.inc where mail sending code is present.
Implementation of the phpmailer class would require the patching of the said class.mail.inc file.