Skip to content

Commit 509f3af

Browse files
Update MailboxValidatorController.php
1 parent c32fbee commit 509f3af

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Controller/MailboxValidatorController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ public function single ($email) {
2727

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

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

0 commit comments

Comments
 (0)