Overview
SHA1:0c5fe2cf61a4ab1e77220b31cde848f97f3b1ae6
Date: 2018-08-01 00:18:25
User: bohwaz
Comment:Corrige return-path si FORCE_EMAIL_FROM est défini
Timelines: family | ancestors | descendants | both | trunk | stable
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2018-08-01
00:22
[35fcafd94e] Répondre à l'auteur du message, pas à l'adresse FORCE_EMAIL_FROM (user: bohwaz, tags: trunk, stable)
00:18
[0c5fe2cf61] Corrige return-path si FORCE_EMAIL_FROM est défini (user: bohwaz, tags: trunk, stable)
2018-07-31
13:33
[9988714b79] Vérifier qu'une adresse email est valide en utilisant la bonne méthode de \KD2\SMTP, fix bug avec les adresses contenant de l'unicode (user: bohwaz, tags: trunk, stable)
Changes

Modified src/include/lib/Garradin/Utils.php from [2c57e78421] to [27ce90a75e].

380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
        // Création du contenu du message
        $content = wordwrap($content);
        $content = trim($content);

        $content = preg_replace("#(?<!\r)\n#si", "\r\n", $content);
        $config = Config::getInstance();

        $headers['Return-Path'] = $config->get('email_asso');

        if (empty($headers['From']))
        {
            if (FORCE_EMAIL_FROM)
            {
                $headers['Reply-To'] = !empty($headers['From']) ? $headers['From'] : $config->get('email_asso');
                $headers['From'] = sprintf('"%s" <%s>', sprintf('=?UTF-8?B?%s?=', base64_encode($config->get('nom_asso'))), FORCE_EMAIL_FROM);







|







380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
        // Création du contenu du message
        $content = wordwrap($content);
        $content = trim($content);

        $content = preg_replace("#(?<!\r)\n#si", "\r\n", $content);
        $config = Config::getInstance();

        $headers['Return-Path'] = FORCE_EMAIL_FROM ?: $config->get('email_asso');

        if (empty($headers['From']))
        {
            if (FORCE_EMAIL_FROM)
            {
                $headers['Reply-To'] = !empty($headers['From']) ? $headers['From'] : $config->get('email_asso');
                $headers['From'] = sprintf('"%s" <%s>', sprintf('=?UTF-8?B?%s?=', base64_encode($config->get('nom_asso'))), FORCE_EMAIL_FROM);