The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Asp code to check if a subscriber exists

Highlighted

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
Highlighted
Employee

Re: Asp code to check if a subscriber exists

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

Highlighted
New Member

Did you figure it?

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

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured