Showing posts with label asp.net. Show all posts
Showing posts with label asp.net. Show all posts

Monday, March 05, 2012

Consuming the JangoMail API in ASP.Net

It's easy to start integrating the JangoMail API into your company's .Net software. Start by adding a service reference to your project. Right click on the project in the solution explorer, then click "Add a Service Reference". Under Address, enter http://api.jangomail.com/api.asmx?WSDL and click "Go". Then change the namespace to JangoMail and click "OK". This will add the files necessary to reference the JangoMail web service within your application or website. Then you can call all the JangoMail/JangoSMTP API methods from within your software.

In this two line example, a JangoMailSoapClient object is created, then used to invoke the method that gets a list of the email lists on your account. Download the source code for this example then start your own integration!

// first create the JangoMail soap client object
JangoMail.JangoMailSoapClient j = 
    new JangoMail.JangoMailSoapClient("JangoMailSoap");

// then call the getlist method and display the results
Result.InnerHtml = 
    j.Groups_GetList_String("Your JangoMail/JangoSMTP Username", 
                            "Your JangoMail/JangoSMTP Password", 
                            "<br/>", " - ", "");

Thursday, April 22, 2010

How to use the ASP.Net script file to integrate your web database with JangoMail

If your organization's web site and database platform is ASP.Net and SQL Server, JangoMail provides a file (w_5.aspx) which you may place on your web server, which allows JangoMail to pull email list data in real-time from your database, as well as update your database with recipient actions, like unsubscribes, bounces, opens, and clicks.

The steps are:
  1. Go to the Lists section and click on the Databases tab.
  2. Click Add New Item.
  3. Choose Internet Web Database and then choose the ASP.Net option.

  4. Retrieve the w_5.aspx file and place on your web server.

  5. Once you have the w_5.aspx file uploaded to your server, click Configure this connection.
  6. Fill in the variable names and values, including the SQL query to retrieve your email list data.

  7. Save the profile, and then click the Connect icon next to the profile name.

You may alter the w_5.aspx file as you see fit. For example, if your web site connects to SQL Server via ODBC instead of the default ASP.Net method, then you may modify the connection string in the w_5.aspx file.

Want to use this feature from the API?

Find out how in this blog post.

Further Reading

Detailed PDF Guide on Connecting to Internet Web Site Databases
Writing your own custom script file for any platform