isSMTP(); $phpmailer->Host = '127.0.0.1'; $phpmailer->Port = 1025; $phpmailer->SMTPAuth = false; $phpmailer->SMTPAutoTLS = false; } ); // WordPress defaults the From address to "wordpress@localhost" in this // environment, which PHPMailer rejects as invalid (no dot in the domain), // causing wp_mail() to fail before it ever reaches mailhog. add_filter( 'wp_mail_from', fn() => 'wordpress@wp-devenv.test' );