Ian Winter Ian Winter

Calling the Mailbuild API from CF

Had to help with someone out today who was trying to call the Mailbuild API from ColdFusion. It's a webservice and was proving a little annoying to get going, but after a bit of playing the final code looks like this.

<cfscript>
 params = structNew();
 params.ApiKey = '{yourkey}';
 params.ListID = '{yourlistid}';
 params.Email = 'name@domain.com';
 params.Name = 'Name';
</cfscript>

<cfinvoke webservice="http://{company}.createsend.com/api/api.asmx?wsdl" method="AddSubscriber" parameters = "#params#">

This is adding a new subscriber to a given list. Hopefully this might help someone integrating with CF!

Comments

Powered by BlogCFC, 5.9.002. Contact Me

All comments, view, rants, raves and opinions are mine and mine alone.

del.icio.us Digg Flickr Last.fm LinkedIn Pownce Twitter YouTube