'WP Mail SMTP', 'fluent-smtp/fluent-smtp.php' => 'FluentSMTP', 'post-smtp/postman-smtp.php' => 'Post SMTP', 'easy-wp-smtp/easy-wp-smtp.php' => 'Easy WP SMTP', 'gmail-smtp/main.php' => 'Gmail SMTP', 'wp-ses/wp-ses.php' => 'WP Offload SES', 'sendgrid-email-delivery-simplified/wpsendgrid.php' => 'SendGrid', ]; $found = []; if (!function_exists('is_plugin_active')) require_once ABSPATH . 'wp-admin/includes/plugin.php'; foreach ($smtp_plugins as $file => $label) { if (is_plugin_active($file)) $found[] = $label; } $f[] = $this->finding( 'mailer', $found ? 'ok' : 'info', 'Mailer', $found ? implode(', ', $found) : 'PHP mail() (default)', $found ? 'Test will route through this plugin.' : 'No SMTP plugin detected — wp_mail will use PHP\'s built-in mail() function, which is often blocked on shared hosts.' ); // Default From address (filter into wp_mail_from) $from = apply_filters('wp_mail_from', ''); if (!$from) { $sitename = parse_url(get_site_url(), PHP_URL_HOST) ?: 'localhost'; $sitename = preg_replace('/^www\./', '', strtolower($sitename)); $from = 'wordpress@' . $sitename; } $f[] = $this->finding('from_address', 'info', 'Default From', $from, 'wp_mail_from filter value.'); return $f; } /** Render the send-test form inside the step card. */ public function render_extra(array $session_state): void { $current = wp_get_current_user(); $default_to = $current && $current->user_email ? $current->user_email : get_option('admin_email'); ?>