Skip to content

Commit

Permalink
Update MailboxValidatorController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MailboxValidator committed Jan 16, 2019
1 parent c32fbee commit 509f3af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Controller/MailboxValidatorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public function single ($email) {

public function disposable ($email) {
$api_key = Configure::read('MBV_API_KEY');
$source = 'cakephp';
if (trim($email) != '') {
$results = file_get_contents('https://api.mailboxvalidator.com/v1/email/disposable?key=' . $api_key . '&email=' .$email);
$results = file_get_contents('https://api.mailboxvalidator.com/v1/email/disposable?key=' . $api_key . '&email=' .$email. '&source=' .$source );
// Decode the return json results and return the data as an array.
$data = json_decode($results,true);
if (trim ($data['error_code']) == '' ) {
Expand All @@ -47,8 +48,9 @@ public function disposable ($email) {

public function free($email){
$api_key = Configure::read('MBV_API_KEY');
$source = 'cakephp';
if (trim($email) != '') {
$results = file_get_contents('https://api.mailboxvalidator.com/v1/email/free?key=' . $api_key . '&email=' .$email);
$results = file_get_contents('https://api.mailboxvalidator.com/v1/email/free?key=' . $api_key . '&email=' .$email. '&source=' .$source );
// Decode the return json results and return the data as an array.
$data = json_decode($results,true);
if (trim ($data['error_code']) == '' ) {
Expand Down

0 comments on commit 509f3af

Please sign in to comment.