Skip to content

Commit 654baf5

Browse files
authored
Merge pull request #1 from sergiy/master
emails like [email protected] should be encoded
2 parents e887090 + f78caf4 commit 654baf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MailgunValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private function queryMailgun($email)
3131
$curl = curl_init();
3232

3333
curl_setopt_array($curl, array(
34-
CURLOPT_URL => self::API_ENDPOINT . "?api_key=" . $this->apiKey . "&address=" . $email,
34+
CURLOPT_URL => self::API_ENDPOINT . "?api_key=" . $this->apiKey . "&address=" . urlencode($email),
3535
CURLOPT_RETURNTRANSFER => true,
3636
CURLOPT_MAXREDIRS => 0,
3737
CURLOPT_TIMEOUT => 30,
@@ -72,4 +72,4 @@ public function validateExtended($email)
7272
}
7373

7474

75-
}
75+
}

0 commit comments

Comments
 (0)