How to add a contact to do not mail list ?

Regular Participant

How to add a contact to do not mail list ?

Hi

Can anybody tell me, how to add a contact to do not mail list ?
I need to display all the contacts from do not mail list in my application. I tried to create an "Export Contacts Activity" but I am always getting the filename as noname. Can anybody help me on this ?
3 REPLIES 3
Occasional Participant

heelo
this is mohan
can anybody help how to add constant contact list in java for my application?
if u know plz give me reply along with source code ...plz send ASAP
mohan
Participant

' // Do this for all the lists you want to add to
. '' // Be sure to get the correct list number(s) for your list(s)
. '


';

// Initialize the cURL session
$request ="http://api.constantcontact.com/ws/customers/" . $UN . "/contacts";
$session = curl_init($request);

// Set up digest authentication
$userNamePassword = $Key . '%' . $UN . ':' . $PW ;

// Set cURL options
curl_setopt($session, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_setopt($session, CURLOPT_USERPWD, $userNamePassword);
curl_setopt($session, CURLOPT_POST, 1);
curl_setopt($session, CURLOPT_POSTFIELDS , $entry);
curl_setopt($session, CURLOPT_HTTPHEADER, Array("Content-Type:application/atom+xml"));
curl_setopt($session, CURLOPT_HEADER, false); // Do not return headers
curl_setopt($session, CURLOPT_RETURNTRANSFER, 1); // If you set this to 0, it will take you to a page with the http response

// Execute cURL session and close it
$response = curl_exec($session);
curl_close($session);

////////////////// END REGISTER EMAIL WITH CONSTANT CONTACT ///////////////////////

// Your code goes here: typically sending a confirmation email, and/or a Header("Location: your_page.php") redirect

?>
Occasional Participant

You can find Java sample code on the Samples Page here.

thanks,
Developer Portal

View API documentation, code samples, get your API key.

Visit Page