HEX
Server: Apache
System: Linux webm013.cluster123.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: lesanew (165608)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/l/e/s/lesanew/anestetues2/web/app/mu-plugins/mailpit-smtp.php
<?php

/**
 * Configure l'envoi d'emails via Mailpit en développement.
 */

add_action('phpmailer_init', function ($phpmailer) {
    if (! function_exists('env')) {
        return;
    }

    $host       = env('MAIL_HOST', '127.0.0.1');
    $port       = (int) env('MAIL_PORT', 1025);
    $username   = env('MAIL_USERNAME');
    $password   = env('MAIL_PASSWORD');
    $encryption = env('MAIL_ENCRYPTION');

    if (empty($host) || empty($port)) {
        return;
    }

    $phpmailer->isSMTP();
    $phpmailer->Host       = $host;
    $phpmailer->Port       = $port;
    $phpmailer->SMTPAuth   = ! empty($username) && ! empty($password);
    $phpmailer->Username   = $username ?: null;
    $phpmailer->Password   = $password ?: null;
    $phpmailer->SMTPSecure = $encryption ?: null;
});