Email Notifications
Overview
After successful form submission (all verification passed, CSV stored), a notification email is sent to the site owner via WordPress wp_mail() with SMTP configuration.
Configuration
| Setting | Option Name | Default |
|---|---|---|
| Notification recipient | opshell_contact_notification_to | donnyaw@gmail.com |
| SMTP Host | opshell_smtp_host | — |
| SMTP Port | opshell_smtp_port | 587 |
| SMTP Username | opshell_smtp_username | — |
| SMTP Password | opshell_smtp_password | — |
| From Email | opshell_smtp_from_email | SMTP username |
| From Name | opshell_smtp_from_name | "Opshell Contact" |
SMTP Configuration
SMTP is configured via phpmailer_init hook using opshell_configure_contact_phpmailer():
add_action("phpmailer_init", "opshell_configure_contact_phpmailer");
// ... wp_mail() call ...
remove_action("phpmailer_init", "opshell_configure_contact_phpmailer");
The action is temporarily added only for contact form emails, avoiding interference with other WordPress emails.
Email Content
| Component | Detail |
|---|---|
| Subject | New verified Opshell contact: {subject} |
| Format | HTML |
| Reply-To | {name} <{email}> |
| Headers | Content-Type: text/html; charset=UTF-8 |
Email Body
The notification email includes a styled HTML table with:
- Timestamp, IP Address, Name, Email, Subject, Message
- Reoon verification results (status, safe_to_send, mode, score)
- Terminal-themed dark styling matching the site design
Email Design
The notification email uses inline CSS with dark theme:
- Background:
#0b1020 - Card:
#111827with#24304dborder - Labels:
#94a3b8 - Values:
#e5e7eb - Accent:
#22c55e(green) for header