.NET Performance Blog

May 17, 2006

.NET Web Service For Email Labs

Filed under: .NET,General — Eric P @ 10:53 am

Recently, one of the clients of my consulting business asked for an integrated email solution. I did some research and found that EmailLabs would fit client needs. They are one of the few companies that provide an API to their email marketing solution. The only issue is that their API is very basic — it works by sending and receiving XML messages through HTTP.

To simplify things I wrote .NET web service that wraps around HTTP messages. It allows .NET developers to quickly tap in into list management, message building and sending functionality provided by EmailLabs. The web service is available at the following location:

http://samples.entechsolutions.com/EmailLabsWebService/Service.asmx

This web service encapsulates about 80% of functionality of EmailLabs API. For this release I concentrated on most useful functions. I didn’t implement functions used for managing Filters and adding/editing Demographics.

To demo the API you can contact EmailLabs to setup a demo account. For testing they let you send e-mails with up to 50 recipients. Or you can send me an e-mail I will give you access to my demo account.

Security Considerations

For API integration EmailLabs provides IP security. For every mail list you can specify a list of IP Addresses that can contact EmailLabs API. To test .NET web service you can provide security the following 2 ways:

A. Disable IP Security for the list

  1. Edit mailing list in EmailLabs admin
  2. Uncheck the ‘Limit API access to these addresses:’ check box
  3. Save

For this approach you may want to create a new test list, so security for other lists stays the same.
B. Add IP Address ‘66.129.79.80’ to secure IP addresses list

  1. Edit mailing list in EmailLabs admin
  2. Check the ‘Limit API access to these addresses:’ check box.
    Add IP addresses ‘66.129.79.80’ to comma delimited list of allowed IP addresses.
  3. Save

This IP address is dynamic, so it is possible that it may change. Let me know if you get authentication error using this approach.

FYI: If you create a new mailing list using Web Service API – it will automatically add appropriate IP address to the list of allowed IP addresses.

Create a free website or blog at WordPress.com.