}
/*
 * Add a new recipient to a DMdelivery campaign.
 * Required credentials: 'insert' privilege for area 'Recipients'
 * @param login: DMdelivery login object.
 * @param campaignID: The database ID of the campaign to work with.
 * @param groupIDs: An array of groups (database IDs) to make the recipient a member of.
 * Provide at least one group. If this array *only* contains the ID of the Opt-in group (60),
 * *and* this is a non-existing recipient, the opt-in confirmation email will be sent to the recipient.
 * @param recipientData: An associative array (key: name of field, value: value of field) containing recipient data.
 * @param addDuplisToGroup: Whether or not to add this recipient to the groups, when the recipient is in the database already.
 * @param overwrite: In case the recipient already exists, whether or not to overwrite the known recipient data with the new data provided.
 * @returns: The database ID of the newly created recipient.
 */
try {
    $result = $client->addRecipient($login, $campaign, array($group), $recipient, 1, 0);
} catch (SoapFault $exception) {
    if ($debug) {
        error_log($exception->getMessage(), 0);
    }
    mail('*****@*****.**', 'eonieuwsbrief addRecipient Soap Error', $exception->getMessage());
}
switch ($result->status) {
    case "OK":
        if ($debug) {
            error_log("OK", 0);
        }
        break;
    case "DUPLICATE":
        if ($debug) {
            error_log("DUPLICATE1", 0);