Using Smartermail Web Services and API to create domains with ColdFusion

We have moved our email services in house over to SmarterMail because of its history, power and flexibility. We used to use MailEnable, and although we like supporting Aussie companies, Smartermail is just that bit more mature. Now to make it easy on clients and ourselves, we have minimised the amount of knowledge required to […]

We have moved our email services in house over to SmarterMail because of its history, power and flexibility. We used to use MailEnable, and although we like supporting Aussie companies, Smartermail is just that bit more mature. Now to make it easy on clients and ourselves, we have minimised the amount of knowledge required to set up new domains, and by adding this code into out intranet, its now simply a case of clicking a button to have the clients domain added, and have the details available ready to hand out. Then we simply hook up the DNS and MX records and we are off!

So first its worth working out what we can actually do with the SmarterMail webservices by reading the docs. Then take a look at the code required:

Now you need to put in all the arguments when consuming a webservice, if you dont want to submit a value, then have a read of Steven Erats information on How to invoke a Web Service while omitting optional service method arguments. Makes for a good read, but as an overview, you need to include one cfargument for each and every argument in the webservice. If you need to submit something as null, or no value, use

If you dont have all the arguments matched to the wsdl then you will see errors like this:

Duncan Isaksen-Loxton

Educated as a web developer, with over 20 years of internet based work and experience, Duncan is a Google Workspace Certified Collaboration Engineer and a WordPress expert.
Login
Log in below to access your courses.
Log In With Google
Forgot Password
Enter your email address or username and we’ll send you instructions to reset your password.