In addition to their regular services, Emma also offers a Remote Signup feature which allows you to build a sign up form on your own website instead of relying on Emma's built-in solutions. This is a really useful feature if you're already collecting customer information and would like to simultaneously add them to your Emma mailing lists.
Emma provides sample PHP code using Pear and cURL, but no ASP solution. Here's an "undocumented" way to get their Remote Signup API working with Classic ASP. Just replace USERNAME, PASSWORD, SIGNUP_POST, ACCOUNT_ID and GROUP_NUMBER with actual values that are provided by EMMA.
ASP Source Code
<% dim stringPost stringPost = "username=USERNAME&password=PASSWORD" &_ "&signup_post=SIGNUP_POST&emma_account_id=ACCOUNT_ID" &_ "&group[GROUP_NUMBER]=1" &_ "&emma_member_name_first=Testfirstname.lastname@example.org" dim xmlhttp set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP") xmlhttp.Open "POST","https://app.e2ma.net/app/view:RemoteSignup",false xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xmlhttp.send stringPost dim stringResult stringResult = xmlhttp.responseText Set xmlhttp = nothing %>To print/access the response code, use
<% Response.Write stringResult %>Interesting factoid: Emma at one point did provide a sample ASP implementation, but it 1) had a bug; and 2) did not work. I played around with it, got it working, and submitted it back to Emma . I got the following reply from their technical support:
"Thanks for sending that along. I passed it to our developers, and they liked this solution. If it's okay with you, we are going to use this as part of our documentation in the future for new Remote Signup users."
Sadly, they still haven't included it in their documentation.