Host = SMTP_HOST; defined( 'SMTP_PORT' ) || define( 'SMTP_PORT', 1025 ); // PHPMailer doesn't follow WordPress naming conventions so this can be ignored. // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $phpmailer->Port = SMTP_PORT; $phpmailer->IsSMTP(); } add_action( 'phpmailer_init', 'mailhog_phpmailer_setup', 10, 2 );