Mail Queue - one email: where it stands, and why it last
* failed or who cancelled it; who it is to and from; when it was queued,
* tried, sent or given up on; its attachments and calendar file; and what it
* says, until it is sent - that is cleared then (cron/mail_queue.php). The
* email is shown as it will arrive, in a sandboxed frame that runs nothing
* and can't reach this page. Retry now, Cancel and Delete as on its row
* (admin/post/mail_queue.php).
*/
require_once '../../includes/modal_header.php';
$email_id = intval($_GET['id'] ?? 0);
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT email_id, email_status, email_attempts, email_from, email_from_name, email_recipient, email_recipient_name,
email_subject, email_content, email_cal_str, email_attachments, email_queued_at, email_failed_at, email_sent_at, " . mailQueueErrorColumn() . "
FROM email_queue WHERE email_id = $email_id LIMIT 1"));
ob_start();
if (!$row) { ?>
That email is no longer in the queue - it may have been deleted.
no address';
}
if ($name === '' || strcasecmp($name, $address) === 0) {
return escapeHtml($address);
}
return escapeHtml($name) . '
= $state['label'] ?>
= escapeHtml($state['detail']) ?>
= escapeHtml($state['error']) ?>
Why it failed
= escapeHtml($state['error']) ?>
- To
- = $person($row['email_recipient_name'], $row['email_recipient']) ?>
- From
- = $person($row['email_from_name'], $row['email_from']) ?>
- Queued
- = escapeHtml($when($row['email_queued_at'])) ?> ยท #= intval($row['email_id']) ?>
- Tries
- = escapeHtml($tries_text) ?>
- Sent
- = escapeHtml($when($row['email_sent_at'])) ?>
- = $state['key'] === 'cancelled' ? 'Cancelled' : 'Last failed' ?>
- = escapeHtml($when($row['email_failed_at'])) ?>
- Attachments
-
= escapeHtml($name) ?>
- Calendar
- A calendar file goes with it
= $status === 3
? 'What it said was cleared when it was sent - an email can carry share links and temporary passwords, so it isn\'t kept.'
: 'There is nothing in it.' ?>