// ============================================================ // Email Notifications Module // ============================================================ async function renderEmailNotifications(params = {}) { const content = document.getElementById('page-content'); if (!Auth.isAdmin() && !Auth.isDev()) { content.innerHTML = `
SMTP configuration, notification rules and delivery log
Add one of these lines to your server's crontab to enable automatic email sending:
# Every minute (real-time delivery)
* * * * * php /home/[user]/public_html/cron/send_notifications.php >> /var/log/ewg_email.log 2>&1
# Every 5 minutes (lower server load)
*/5 * * * * php /home/[user]/public_html/cron/send_notifications.php >> /var/log/ewg_email.log 2>&1
/home/[user]/public_html/ with your actual server path. On cPanel you can add crons under Cron Jobs in your hosting panel.
${_esc(res.errors.join('\n'))}| Event | Active | Notify Roles |
${section.hasAssignedPerson
? 'Assigned Person' : 'β'} |
${section.hasClient ? 'Client' : 'β'} | Extra Recipients |
|---|---|---|---|---|---|
| No rules configured for this section. | |||||
| Time | Type | Recipient | Subject | Status | Error |
|---|---|---|---|---|---|
| ${_fmtDt(l.sent_at)} | ${l.notification_type || 'β'} | ${_esc(l.recipient_email)} | ${l.status === 'sent' ? 'β Sent' : 'β Failed' } |
Sent emails will appear here once the cron runs.
| Status | Type | Recipient | Subject | Attempts | Created | Error | ||
|---|---|---|---|---|---|---|---|---|
| ${q.status === 'pending' ? 'Pending' : 'Failed' } | ${q.notification_type} | ${_esc(q.recipient_email)} | ${q.attempts}/3 | ${_fmtDt(q.created_at)} |
All emails have been delivered.
/home/[user]/public_html/ with your actual server path. Add via cPanel β Cron Jobs.