Commit d283ce70 authored by Thomas Bella's avatar Thomas Bella

Switch to PHPMailer email validation

parent e0395cdb
Pipeline #306 passed with stage
in 24 seconds
......@@ -6,6 +6,7 @@ if (!isset($SQL)) {
// include
require_once "functions/checkDomain.php";
require_once "assets/ports.php";
require_once "class/phpmailer.class.php";
// var
$error = "";
......@@ -86,7 +87,7 @@ if (isset($_POST["add"], $_POST["type"]) && $_POST["type"] == "domain") {
$emails = explode(';', $_POST["emailList"]);
$validList = '';
foreach($emails as $singleEmail) {
if (filter_var($singleEmail, FILTER_VALIDATE_EMAIL)) {
if (PHPMailer::ValidateAddress($singleEmail)) {
if ($validList != '') {
$validList .= ';';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment