Skip to main content

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

SettingOption NameDefault
Notification recipientopshell_contact_notification_todonnyaw@gmail.com
SMTP Hostopshell_smtp_host
SMTP Portopshell_smtp_port587
SMTP Usernameopshell_smtp_username
SMTP Passwordopshell_smtp_password
From Emailopshell_smtp_from_emailSMTP username
From Nameopshell_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

ComponentDetail
SubjectNew verified Opshell contact: {subject}
FormatHTML
Reply-To{name} <{email}>
HeadersContent-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: #111827 with #24304d border
  • Labels: #94a3b8
  • Values: #e5e7eb
  • Accent: #22c55e (green) for header