HEX
Server: nginx/1.27.1
System: Linux in-3 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
User: ivenus-clone (3297)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v4513/ivenusnew/public_html/wp-content/plugins/fluent-smtp/app/Hooks/actions.php
<?php
/*
 * @var $app FluentMail\Includes\Core\Application
 */

(new \FluentMail\App\Hooks\Handlers\AdminMenuHandler($app))->addFluentMailMenu();

(new \FluentMail\App\Hooks\Handlers\SchedulerHandler())->register();

(new \FluentMail\App\Hooks\Handlers\InitializeSiteHandler())->addHandler();

$app->addCustomAction('handle_exception', 'ExceptionHandler@handle');

$app->addAction('admin_notices', 'AdminMenuHandler@maybeAdminNotice');

add_action('rest_api_init', function () use ($app) {
    register_rest_route('fluent-smtp', '/outlook_callback/', array(
        'methods'             => 'GET',
        'callback'            => function (\WP_REST_Request $request) use ($app) {
            $code = $request->get_param('code');
            header("Content-Type: text/html");
            $app->view->render('admin.html_code', [
                'title' => 'Your Access Code',
                'body'  => '<p>Copy the following code and paste in the fluentSMTP settings</p><textarea readonly>' . sanitize_textarea_field($code) . '</textarea>'
            ]);
            die();
        },
        'permission_callback' => function () {
            $state = $_REQUEST['state'];
            if($state != get_option('_fluentmail_last_generated_state')) {
                return false;
            }
            return true;
        }
    ));
});