<?php

namespace RtmMail\AjaxAction;

use RtmMail\Actions\Handlers\TestSmtpSettingsAction;

class TestSmtpSettingsAjaxAction
{
    public function __construct()
    {
    }

    public function handleAction(): void
    {
        $smtpTester = new TestSmtpSettingsAction();

        // Call the handler and get the result
        $result = $smtpTester->handleAction();

        // Send the result as JSON
        wp_send_json($result);
    }
}
