Send Time Optimisation
OM_SendTime calculates the best hour to email each subscriber based on their historical open behaviour.
How It Works
- Every open event is logged in
om_eventswith a timestamp - For each subscriber, OMailer scores each hour of the week (0–23) by open frequency
- The top-scoring hour becomes
optimal_send_houron the subscriber record - Requires a minimum of 3 historical opens to produce a signal; returns NULL until then
- Recalculates weekly via cron
Campaign Send Modes
Set send_mode = 'smart' on a campaign to use per-subscriber optimal hours. The campaign sends in batches over a 24-hour window, each subscriber receiving their email at their optimal local hour.
PHP API
php// Get the optimal send hour for a subscriber (0-23 or null)
$hour = OM_SendTime::get_optimal_hour( $subscriber_id );
// Force recalculation for all subscribers (runs via cron weekly)
OM_SendTime::recalculate_all();
// Get the stored optimal hour without recalculating
$stored = OM_SendTime::get_stored_hour( $subscriber_id );