Tuesday, April 27, 2010

New Feature: Reset statistics for a Transactional Email Group

You now have the option to reset the statistics for any Transactional Group to all zeroes. This won't delete any of the data behind the statistics, but will just start counting all unsubscribes, bounces, opens, clicks, and complaints from zero again. So, you can still see all of the email address that unsubscribed, bounced, opened, clicked, and complained historically.



Why would you want to reset your statistics?

There are many reasons, but the most common one is if you're sending test emails as part of a Transactional Group, and you're ready to stop sending and start sending for real. You may not want the counts from the test emails counted in your official Transactional Group statistics.

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

Wednesday, April 21, 2010

How to write a custom web server script for JangoMail integration

JangoMail was one of the first and is one of the only email marketing service providers that can connect to a customer's web site database in real-time. Historically, we've supported and provided web server script files for 4 different scenarios:

Active Server Pages / ODBC Database -- w_1.asp
Active Server Pages / Microsoft SQL Server -- w_2.asp
Active Server Page / Microsoft Access -- w_3.asp
PHP / MySQL -- w_4.php

Recently, we added a fifth option:

ASP.Net page / Microsoft SQL Server - w_5.aspx

All five of these platforms and the five corresponding files are provided to you by JangoMail.

Still, many customers have web/database server that don't fit into one of these canned scenarios. Now, you have the ability to write your own web server script file, based on whatever platform you're running.

First, let's look at the screen in JangoMail where you plug in variable names and values that will be passed into your custom web server script.



Go to Lists --> Databases --> Add New Item




Select Internet Web Database and then ASP.net. 


Download the script file provided and upload it to your platform.
Then click Configure this connection.


Here you will enter your variable names and values.

There are seven variable names and values you may specify. You need not use all seven. For each variable name/value that you specify, your web server script file must be written to accept each variable as a FORM POST. The variable and its corresponding value will be passed to your script file. Note that the variable "action" will be passed always with the value "massmail". This informs your script file that the purpose of this call is to generate a set of data for a mass emailing (as opposed to a synchronization call which we'll cover later).

Once you've programmed your script to accept the variables and values via FORM POST, you must next program your script to generate data based on these variables. Example variables may be:

DatabaseName
DatabaseLogin
DatabasePassword
SQL

Based on your web/database platform, these four variables may be sufficient for your script to connect to your database and generate a set of email addresses and other corresponding data.

Regardless of the input parameters that your script takes, the script must generate your email list data in the following format:

FieldName1,FieldName2,FieldName3___ASDF---BREAKValue1WG0COLWG0Value2WG0COLWG0Value3WG0ROWWG0ValueAWG0COLWG0ValueBWG0COLWG0ValueCWG0ROWWG0WANGO-ENDOFDATASTREAM

Let's break this down and look at it more closely. The output the script should generate is:

1. The field names, separated by a comma.
2. Next, is a standard separator used by JangoMail to separate the field names from the field values: "___ASDF---BREAK"
3. Next comes the actual data, using a column separator of "WG0COLWG0" and a row separator of WG0ROWWG0 (and add an extra row delimiter at the end, before the "end of data stream" line).
4. Finally, at the end of the data string, end with "WANGO-ENDOFDATASTREAM"

For example, assuming you're passing in the correct parameters to connect to your database, and your SQL is:

select FirstName, LastName, EmailAddress from Users

and it returns two records, the output of the script should look like:

FirstName,LastName,EmailAddress___ASDF---BREAKJohnWG0COLWG0SmithWG0COLWG0johnsmith@yahoo.comWG0ROWWG0NateWG0COLWG0LakemanWG0COLWG0nlakeman@gmail.comWG0ROWWG0WANGO-ENDOFDATASTREAM

Therefore, using the example above with the four input variables, the screen would be filled in as follows:




This example assumes that I have called my script file JangoScript.do and that I've placed it in the root directory of www.browniekitchen.com. It also assumes that JangoScript.do is programmed to accept the five POST variables: action, DatabaseName, DatabaseLogin, DatabasePassword, SQL.


When you connect to that profile, JangoMail will connect to your JangoScript.do file, the script will output the data for the two records, and take you to this screen, where you can select your campaign to send to the two recipients:






Frequently Asked Questions
1. Do I have to pass in variables to my script file, or can I hard-code the values directly into my script file?

No, you don't have to pass in any variables to the script file, and you may hard-code them within the script file. The disadvantage to doing so are that a. This allows anyone that knows the script file exists to access it and have it output your email list data and b. It prevents JangoMail from synchronizing your database with unsubscribes, bounces, and other recipient actions, since the SQL query will be hard-coded within your script file, and the SQL query will be the query to retrieve email list data, not update it. A better solution may be to do a hybrid between the integration scenario presented above and hard-coding. For example, the database credentials could be hard-coded into the script file, while only the SQL query and a special password that is validated within the logic of the page is passed to the file by JangoMail.

2. Is this method of connecting to my data secure?

Yes. It is inherently secure if you opt to have JangoMail connect over https instead of http. It can be additionally secured by restricting the range of IP addresses allowed to connect to the custom script file. JangoMail's range of IP addresses are: 209.173.141.193 - 209.173.141.255

3. What is the purpose of the "action" variable name that is forced?

The action variable set to "massmail" tells the script file that this call is specifically to retrieve email list data for a mass emailing, as opposed to other possible actions, like those that synchronize the data with unsubscribe and bounce data.

4. Why does JangoMail need to know which of my variables represents the SQL string?

If you're only using the Web Database Connect feature to retrieve email list data via the web interface only (not the API), you can ignore this setting. This setting is only relevant if you wish to do one of the following:

a. Call the SendMassEmail API method and specify a SQL query in the ToWebDatabase input parameter.
b. Use any of the data synchronization options, like syncing unsubscribe and bounce data back to your database.

In both of these cases, a Master Web Database Profile must be set under Settings. And then, when JangoMail calls the SQL for either scenario a or b, the SQL for the scenario will be passed as the value of the variable rather than the value in the actual web database profile.

5. Where can I read more about this feature?

The following PDF was written when the Web Database Connectivity feature was first made available, and when it was only available on the first four platforms:

https://www.jangomail.com/documents/Public/JangoMail_Tutorial_Web_Database.pdf

Three Bug Fixes to SMTP Service

We've deployed three bug fixes to JangoMail's SMTP Server, relay.jangosmtp.net. These three bugs were detected by customers relaying emails with eccentric attributes through the SMTP server.

1. Emails containing MIME boundaries with parentheses will now be properly handled.

Previously, emails with parentheses in the MIME boundaries, such as a boundary like:

Content-Type: multipart/mixed; boundary="nqp=nb64=()BDXjw0yWx"

would cause the JangoSMTP parser to throw an error. This is now fixed.

2. Emails containing unrecognized Content-Transfer-Encoding types will now default to "7bit".

Previously, if an email message contained an unrecognized or misspelled encoding type, like:

Content-Transfer-Encoding: 7 bit

would cause the JangoSMTP parser to throw an error. This is now fixed.

3. Emails containing foreign characters encoded as ISO-8859-1 will be properly handled.

Previously, an email containing certain foreign characters would have those characters replaced with ? marks or garbled when passed through the relay. For example, a Subject like:

Subject: Confirmation d'Inscription à la Liste de Diffusion - Liste TEST ML

would not have its foreign characters preserved. This is now fixed.

Monday, April 19, 2010

New Feature: FTP your HTML email templates to your account

You can now FTP HTML email template files to client.jangomail.com, and then choose from these templates to compose an email campaign.

FTP to an email template file, such as a .htm or a .html file to client.jangomail.com/HTMLTemplates. Login to client.jangomail.com using your JangoMail username and password.

Command Line FTP Example

The above screenshot shows a command line FTP example of connecting to client.jangomail.com and uploading an HTML template file called BrownieMemorialDay.html.

You may use a friendlier FTP application like FileZilla or even Internet Explorer.

Once you have FTPd a template file, that file will show up after you click the +New Message button in the Messages section. Choose with an Uploaded Template to find your template.




What else can you do with FTP?


You can control several aspects of your JangoMail account via FTP. FTP to client.jangomail.com to:
  1. Upload images and other email content to client.jangomail.com/Images
  2. Upload file attachments that you wish to mass email to your recipients, to client.jangomail.com/Attachments.
  3. Upload email list files to client.jangomail.com/GroupImportsAutoFTP, and JangoMail will automatically turn your file into an Email List to which you can send an email campaign.