Overview
Comment:Filtrer les adresses email invalides avant envoi
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: 5bae836a5b1a059ae28ff5a5fd211b54a2d9d12b
User & Date: bohwaz on 2018-05-22 13:44:46
Other Links: manifest | tags
References
2020-12-08
23:25 Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz
Context
2018-05-22
13:53
Corrige scrolling horizontal fix [016baf71850425de] check-in: f0a66b7b22 user: bohwaz tags: trunk, stable
13:44
Filtrer les adresses email invalides avant envoi check-in: 5bae836a5b user: bohwaz tags: trunk, stable
2018-05-16
21:22
Correction des URI dans les pages wiki (pages avec un tiret à la fin ou au début de l'URI) check-in: 3bd6986537 user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Utils.php from [eb83eb79bd] to [936bf5540b].

404
405
406
407
408
409
410






411
412
413
414
415
416
417
        if (!is_array($to))
        {
            $to = [$to];
        }

        foreach ($to as $recipient)
        {






            if (!self::_sendMail($recipient, $subject, $content, $headers))
            {
                throw new \RuntimeException('Impossible d\'envoyer l\'email');
            }
        }

        return true;







>
>
>
>
>
>







404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
        if (!is_array($to))
        {
            $to = [$to];
        }

        foreach ($to as $recipient)
        {
            // Ne pas envoyer de mail à des adresses invalides
            if (!var_filter($recipient, FILTER_VALIDATE_EMAIL))
            {
                continue;
            }

            if (!self::_sendMail($recipient, $subject, $content, $headers))
            {
                throw new \RuntimeException('Impossible d\'envoyer l\'email');
            }
        }

        return true;