Classic ASP samples?

I've seen various mentions of classic ASP samples in the forum, but where are they?
Any links i've found seem to go to 404 pages.
Are there any classic ASP samples?

Dave Dave, 7 years ago

Hey Brian, after our recent API update we removed the classic ASP sample, and plan on releasing a new version of it here in the next week or two. We'll announce it in the blog when it's available.

PaulB, 7 years ago

Hello Dave,

Has there been any progress on updating these ASP samples ?



squarefish, 7 years ago

I'm also desperate for these...!

bmbwd57, 7 years ago

I got bored waiting, so i put this together which seems to work OK for me. Thought it might help others.
I have this code as part of a "checkout" process...

    ' if the customer has indicated they want to be added to the mailing list, then call Campaign Monitor and add them
    If Request.Form("chkAddToMailingList") <> "" Then
        CM_API = addSubscriber(getListKeyFromCourseBookingId(Request.Form("MM_recordId")), Request.Form("strContactEmail"), Request.Form("strRecipientName"))
    End If

Basically, if the customer has ticked the box to be added to the mailing list it calls the function addSubscriber() and passes the mailing list key, the email address and name.
The addSubscriber function looks like this...

Function addSubscriber(strListKey, strEmail, strName)
    Dim postdata
    postdata = "<?xml version=""1.0"" encoding=""utf-8""?>"
    postdata = postdata & "<soap:Envelope xmlns:xsi="""" xmlns:xsd="""" xmlns:soap="""">"
    postdata = postdata & "<soap:Body>"
    postdata = postdata & " <Subscriber.Add xmlns="""">"
    postdata = postdata & " <ApiKey>ADD YOUR API KEY HERE</ApiKey>"
    postdata = postdata & " <ListID>" & strListKey & "</ListID>"
    postdata = postdata & " <Email>" & strEmail & "</Email>"
    postdata = postdata & " <Name>" & strName & "</Name>"
    postdata = postdata & " </Subscriber.Add>"
    postdata = postdata & "</soap:Body>"
    postdata = postdata & "</soap:Envelope>"
    Dim xmlhttp
    set xmlhttp=Server.CreateObject("MSXML2.ServerXMLHTTP") "POST","" ,false
    xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
    xmlhttp.setRequestHeader "SOAPAction", """"""
    xmlhttp.send postdata
    set xmlhttp = nothing
End Function

EllenD, 4 years ago

Thanks bmbwd57, this helped me at lot. It seems CM is missing 'offiical' samples for classic ASP. I know it's an older technology but a lot of my client websites do use it. Any plans for the samples mentioned above CM? It looks like there used to be one but it got removed?

Jason Jason, 4 years ago

Hi Ellen,

I've replied to your direct support request too, but thought I'd put a quick wrap up here. Using the first two resources to get basic xml requests going, you should then be able to use our documentation to to see what structure xml the endpoints for each method expect.

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free