Check whether an email is in the recipient file
Check whether an email is in the recipient file
Verifier_Presence
int Verifier_Presence (login, password, campagne, email)
Description
Check whether an email address is in the recipient list of a campaign. This function is needed if you want to avoid duplicates (by default, API-managed campaigns can contain duplicates).
Parameters (required)
login: customer ID (nichandle)
motdepasse: the password
campagne: the campaign identifier
email: the email address
Return value
true if the address is present
false otherwise
Error messages
No field must be left empty login
No field must be left empty motdepasse
No field must be left empty campagne
No field must be left empty email
Authentication error (invalid login / password)
Example with NuSOAP
include('nusoap/nusoap.php');
$client = new soapclient('https://www.eml-srv.com/_soap/control.php');
$parametres = array( 'login'=>'your_login', 'motdepasse'=>'your_password', 'campagne'=>'id_campagne', 'email'=>'info@ediware.net' );
$variable=$client->call('Verifier_Presence', $parametres);
// Retrieve the error, if any
if($client->fault) die("Error:Code: {$client->faultcode}
" . "Detail: {$client->faultactor}
" . "Solution: {$client->faultstring}
");
echo 'Response:'.$variable.'
';Example with PHP5
try { $client = new SoapClient(null, array('location' => "https://www.eml-srv.com/_soap/control.php", 'uri' => "https://www.eml-srv.com", 'encoding'=>'ISO-8859-1' ));
$variable = $client->Verifier_Presence('your_login','your_password','campagne','email'); //or //$variable = $client->__soapCall(Verifier_Presence,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}Last updated on