Update Contacts By Email

Update Contacts By Email


Function

  • updateContactByEmail()

Parameters

  • username: String
    • Account login name.
  • password: String
    • Account password.
  • listId: int
    • set -1 to update across All lists.
  • email: String
    • email to set the opt-out status for.
  • optOut: boolean
    • set opted out or not.
  • emailBounced: boolean
    • set email Bounced or not.

Return

  • int:
    • 1: success

Exception

  • Exception

Documentation

  • Update Contact by Email.

Examples

public void updateContactByEmailSample() throws java.lang.Exception {

        Puresend p = new Puresend();
        PuresendPortType ppt = p.getPuresendHttpsSoap12Endpoint();

        String username = "XXX";
        String password = "XXX";
        String email = "example@domain.com";
        int listId = -1;

        int result = ppt.updateContactByEmail(username, 
                                password,
                                listId,
                                email,
                                false,
                                false);
}
<?php
include 'puresend.php';

$p = new Puresend();

$updateContactByEmailData = new updateContactByEmail();
$updateContactByEmailData->username = 'XXX';
$updateContactByEmailData->password = 'XXX';
$updateContactByEmailData->listId = -1;
$updateContactByEmailData->email = "example@domain.com";
$updateContactByEmailData->optOut = false;
$updateContactByEmailData->emailBounced = false;

$response = $p->updateContactByEmail($updateContactByEmailData);
var_dump($response);

?>