Thursday, May 27, 2010

JangoSMTP now supports SSL/TLS

JangoMail has added support for SSL connections to our relay server from your email client of choice (e.g. Outlook, Thunderbird, Mac Mail, etc.). Just as when you use an HTTPS connection to connect to a website and make a secure online purchase, you can use the same technology to setup a secure connection with JangoMail and send email through your JangoSMTP account. This ensures your JangoSMTP username and password remain secure as they are transmitted between your computer and JangoSMTP relay servers. All that's needed to enable this feature a quick settings change in your email client.

Note: These instructions assume you already have your JangoSMTP account setup in your mail client. Follow these directions if you don't already have your mail client setup to send through your JangoSMTP account.

Outlook:

  1. Click on Tools -> Account Settings
  2. Highlight your JangoSMTP account and click Change...
  3. Click More Settings...
  4. Go to the Advanced tab
  5. Choose SSL in the Use the following type of encrypted connection: dropdown
  6. Change the Outgoing server (SMTP) port number to 465




Thunderbird:

  1. Go to Tools -> Account Settings
  2. Click Outgoing Server (SMTP)
  3. Choose the entry for relay.jangosmtp.net and click Edit
  4. Check the Use Secure Connection box and choose SSL/TLS from the Connection security dropdown



Mac Mail:

  1. Go to Mail -> Preferences
  2. Click on the Accounts tab
  3. Choose your JangoSMTP account at the left
  4. Click on Edit Server List... from the Outgoing Mail Server (SMTP) dropdown
  5. Select the entry for relay.jangosmtp.net and click on the Advanced tab
  6. Put a check next to Use Secure Sockets Layer (SSL)
  7. Select Use custom port and enter 465 as the value



Most modern email clients support SSL/TLS. If your email client is not listed above, open up your account settings configuration page and find the outgoing email server connection settings. The option you want to enable will be called SSL/TLS (not STARTTLS). Also look out for a default connection port. Generally this port number will be 25 or 2525 before you setup SSL/TLS, but it should be changed to 465 after the feature is setup. When in doubt, submit a support ticket and a member of the JangoSMTP support team will be able to assist you in choosing the right options.

Monday, May 03, 2010

How to use the API method SendMassEmail to connect to a website database

The SendMassEmail method of the JangoMail Email Marketing API is a versatile method that can launch an email campaign to recipients in a variety of ways. There are various "To" input parameters, each with its own use depending on where your email list data is stored.

The full specification of the method is located here. The "To" input parameters include:
  • ToGroups - send to an entire Email List - specify the name of an Email List (also called an Email Group) to send to. Specify multiple Email Lists separated by a comma
  • ToGroupFilter - sent to a segment of an Email List - specify the name of an Email List followed by a colon followed by a valid SQL filter (just the WHERE clause). For example, if you have an Email List called Contact List with the fields FirstName, LastName, and Company, then an acceptable input value would be "Contact List: Company = 'ABC Corporation'". An additional acceptable input value would be "Contact List: Company = 'ABC Corporation' OR FirstName = 'John'".
  • ToOther - specify a string of email addresses in any unstructured format. JangoMail will parse the data and pull out the email addresses and send to them. Optionally, pass structured data on-the-fly with field name and field value information, in order to send personalized emails to a dataset on the fly.
  • ToWebDatabase - pass in a SQL query (usually a SELECT statement) that will be executed against your web site database, in real-time, to pull down a list of email list data, to send a personalized email campaign.
This article will focus on how to use the ToWebDatabase input parameter.

In order to be able to use this feature, your JangoMail account first needs to know how to connect to your web database platform. There are two steps to this:
  1. You must create a Web Database Connection Profile. Create a Web Database Connection Profile under Lists --> Databases --> Add New Item --> Internet Web Database. If you're not familiar with creating a connection profile, see the detailed PDF guide.
  2. Then you must set this Profile as the Master Profile, so that the API knows that this connection profile is the one to use when you use ToWebDatabase. Set the Web Database Connection Profile as your Master Profile under Settings --> Integrating JangoMail with Other Systems --> Set Master Profile for Web DB. See screenshot below:


Set Master Connection Profile here.

If you attempt to call SendMassEmail and specify a value for ToWebDatabase without first having set a Master Profile, you will get this web service Exception:

MissingWebDatabaseSettings: There is no Master Web Database Connection Profile set for your account. This must be set prior to specifying a SQL query for the ToWebDatabase parameter.
Once you have set the Master Profile, you're ready to make the API call and pass in a SQL query in the ToWebDatabase input parameter. If you wanted to send to all email addresses that had been added to your database in the last 24 hours, for example, your SQL query might be:

select * from Accounts where AccountCreateDate >= dateadd(hh, -24, getdate())

And the full API call would look like the screenshot below:

Changes to web database connection settings

We made a change this weekend that affects all users that had set web database settings under Settings --> Web Site / DB Settings.

[This screen should no longer be used.]

Settings on this page were applicable when any of the following operations were executed:
  1. Synchronization of unsubscribes, bounces, opens, clicks, forwards with a web site database
  2. A call to the SendMassEmail or SendMassEmailPrevious2 API methods, while passing in a SQL query to the ToWebDatabase parameter.
Thus the settings were applicable for web database operations that occurred outside the normal JangoMail web interface (offline operations).

We have now replaced these settings with the ability to declare an existing Web Database Connection Profile as the Master Web Database Connection Profile. The profile chosen as the Master Profile will be the profile whose connection information will be used for the aforementioned "offline" operations.

[The "Master Profile" page should be used instead.]

If you had settings on this page, then a new web database profile has been created for you called Default Master Profile. This profile copies the settings from this page, and is already set as your default profile.


Only one web database connection profile can be declared as the Master Profile:



Web Database Connection Profiles can be created under Connect to My Database --> Connect to Internet Web Site Database. Once the profile has been created, it can be set to be the Master Profile under Settings --> Web Site Database --> Master Profile.

Note: If you are using a custom web database integration, it is important to correctly set the Variable Name that is the SQL Statement when you create your master profile. It is this variable that is substituted with the correct SQL statement when either of the two offline operations mentioned above are encountered.


For now, we have left the page "Web Site / DB Settings" in place, but we'll soon be removing this page from the interface completely.

Saturday, May 01, 2010

This blog has moved


This blog is now located at http://blog.jangomail.com/.
You will be automatically redirected in 30 seconds, or you may click here.

For feed subscribers, please update your feed subscriptions to
http://blog.jangomail.com/feeds/posts/default.