Update and rename email_cron.php to email_log_cron.php

This commit is contained in:
FusionPBX 2019-04-18 09:01:05 -06:00 committed by GitHub
parent b38d578b48
commit 082170e80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@
} }
//get the failed emails //get the failed emails
$sql = "select email_uuid, email from v_emails limit 100"; $sql = "select email_log_uuid, email from v_email_logs limit 100";
$prep_statement = $db->prepare(check_sql($sql)); $prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute(); $prep_statement->execute();
$emails = $prep_statement->fetchAll(PDO::FETCH_NAMED); $emails = $prep_statement->fetchAll(PDO::FETCH_NAMED);
@ -29,7 +29,7 @@
//process the emails //process the emails
if (is_array($emails)) { if (is_array($emails)) {
foreach($emails as $row) { foreach($emails as $row) {
$email_uuid = $row['email_uuid']; $email_log_uuid = $row['email_log_uuid'];
$msg = $row['email']; $msg = $row['email'];
require_once "secure/v_mailto.php"; require_once "secure/v_mailto.php";
@ -38,8 +38,8 @@
message::add($text['message-message_resent']); message::add($text['message-message_resent']);
//delete the email //delete the email
$sql = "delete from v_emails "; $sql = "delete from v_email_logs ";
$sql .= "where email_uuid = '".$email_uuid."' "; $sql .= "where email_log_uuid = '".$email_log_uuid."' ";
$prep_statement = $db->prepare(check_sql($sql)); $prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute(); $prep_statement->execute();
unset($sql, $prep_statement); unset($sql, $prep_statement);