0) {
$html = "";
while ($row = mysqli_fetch_array($sqlQuery)) {
$stock_qty = $row['stock_qty'];
$html .= " ITEM ID " . $row['item_id'] . " STOCK QTY " . $stock_qty . " BATCH NO " . $row['item_batch_no'] . "
";
$eMailFlag = 0;
}
}
if ($eMailFlag == 0) {
$from = getConfigKey('email_username');
$host = getConfigKey('email_host');
$user = getConfigKey('email_username');
$pass = getConfigKey('email_password');
$port = getConfigKey('email_port');
$auth = getConfigKey('SMTP_AUTH');
$SMTPSecure = getConfigKey('SMTPSecure');
error_log('sender ' . getConfigKey('email_username'));
error_log('sender ' . getConfigKey('email_password'));
error_log('sender ' . $host);
error_log('sender ' . getConfigKey('email_port'));
error_log('sender ' . getConfigKey('SMTPSecure'));
$subject = 'Minus Inventory';
$message="
Hi,
items in minus stock Please Check Now
$html
";
$to = 'dushant@techsyneric.com,vaibhav@techsyneric.com';
$cc = 'sitaramsingh@techsyneric.com';
send_mail($to, $cc, $subject, $message, $remarks, $from, $host, $auth, $user, $pass, $port, $SMTPSecure);
}
?>