We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Asp code to check if a subscriber exists

jacquelinegreenwood
Participant

Asp code to check if a subscriber exists

I am trying to write an asp script that will check to see if an email address (in my database), called "members_email" exists as a subscriber.


<%


If members_email exists as a subscriber then


Response.Write ("Thank you for subscribing to our newsletter.")


Else


Response.Write  ("Please subscribe to our newsletter.")


End If


%>


Can anyone help?


 


 


 

2 REPLIES 2
David_J
Employee

If you are using ASP.NET and looking to check if a contact exists within your Constant Contact account use, we do have sample forms which will tell if a contact already exists when you are adding them. This code could be modified to serve your purpose, and you can obtain this from our Code Samples page. If you are using classic ASP we unfortunately do not have any samples for that at this time.


 


On the other hand, if you are looking to check if an email address exists within your own personal database and add it to Constant Contact if it does not, we do not have any code built for that. This would basically involve looping through all of the email addresses in your members_email table and Search your Constant Contact account by Email Address. If a contact with that email exists, the query will return the contact's <entry>, otherwise the response will not contain an <entry> node. In the event a contact does not exist, you would want to Create a Contact using the email address in question.

David J

alex.uls
Occasional Participant

Hey did you figure out how to do this? I am trying to do the same thing.

Xing

Developer Portal

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

Visit Page