Thursday, August 13, 2009

Behind the scenes of our SMTP Service

The last couple of days have been a challenging and learning experience for the team in charge of our SMTP Relay service. As the volume of email that passes through the relay grows, so do the problems associated with performance and scaleability.

The first version of the relay service operated in a single-threaded linear fashion. Meaning, all emails sent to relay.jangosmtp.net, are processed and sent one at a time. Whenever an email message arrives at relay.jangosmtp.net, the following steps are executed:

1. The originating IP address and From Address are examined to determine what JangoSMTP user account the email message belongs to.

2. The tracking options for that particular user are loaded.

3. The email message is disassembled, the tracking mechanisms are added, and then the email message is re-assembled.

4. The email message is transmitted to the appropriate JangoSMTP sending server, based on whether the user account is enrolled in the Sender Score Certified program or based on the domain of the recipient email address.

5. The sending email server receives the message, signs the message with DomainKeys and DKIM, and then transmits the email message to the final destination email server based on the recipient domain.

A traditional SMTP service is much simpler and only need incorporate step 1 and a part of step 5. It can take our processes anywhere from 1/10th of a second to 3 seconds to process and deliver a single email message. The amount of time depends on the size of the email, the encoding of the email, and the tracking options selected.

Tuesday morning, a larger client submitted 50,000 transactional emails to relay.jangosmtp.net. The emails arrived at the relay.jangosmtp.net server over the course of 5 hours. Our linear process went to work, processing and transmitting each email message individually. As a result, email messages from other, smaller customers were delayed, some for serveral hours. We were alerted to the problem very soon after the backlog of emails began to build. Since all JangoMail staff members use the JangoMail SMTP relay with their desktop email clients, it was easy for them to tell something was wrong -- emails my staff was sending to customers, prospects, and themselves weren't being received. We realized that having a single process, processing each email one by one, just isn't going to cut it for scenarios where a customer transmits a large amount of email messages at once.

Within 8 hours, we re-architected the entire process so that multiple threads could operate on groups of email messages simultaneously. We now have the ability to assign a dedicated processing thread to any large customer. Since all threads operate simultaneously, a large amount of email from one customer will now not hold up a small amount of email from another customer.

After we deployed the new code last night, we thought our problems were solved. We awoke Wednesday morning to discover that the multi-threaded process was crashing, due to I/O concurrency issues. The constant crashing of the new code resulted in another backlog of undelivered email messages. Within 10 minutes, we discovered the issue was that all threads were attempting to log their activities to the same log file, and this was resulting in I/O disk errors. Within 60 minutes, we corrected the issue and deployed the new code, and since then (1:15 PM EST Wednesday), there have been no errors and no backlogs.

We appreciate our SMTP service customers' support over the last couple days, especially those that were adversely affected by the backlog of emails. One of the factors that I think makes JangoMail a different type of company is the awesome skill and dedication of our developers. When an architectural or functional issue is discovered, our programmers work until the problem is solved. We react swiftly, coming up with creative solutions to difficult problems within minutes -- because if we don't, the problems get worse: backlogs build, emails stop sending, the system could grind to a halt. The types of development problems we face are generally not the type that can be solved with a Google search. This is because much of JangoMail's technology is unique. We've done things that very few companies in our industry have done, including writing our own Email Rendering Tool, writing our own SMTP sending engine from scratch, and now, introducing the world's first SMTP service with tracking.

I hope this post sheds some light on the inner workings of the JangoMail operation, my staff's committment to delivering an amazing service, and a little bit of our secret sauce on how the magic happens. If anyone has any questions about the SMTP service, email me at ajay AT us dot jangomail dot com.

Sunday, August 2, 2009

You Can Now Use the JangoSMTP Relay with Gmail

Gmail allows users to use a custom From Address to send emails, but some recipients would see both the From Address and the Gmail Sender Address. Messages would appear to recipients as "From username@gmail.com On Behalf Of username@customdomain.com". Gmail announced last week that users can now send with their custom domain through their company's email servers, and that will eliminate the "On Behalf of" message.

This means that you can now use the JangoMail SMTP Service with Gmail to eliminate the "On Behalf of" message and give you the added benefits of Open Tracking, Click Tracking, SMTP logging, and participation in the Sender Score Certified Program.

*Please note: This is only available for people using a custom From Address (NON-Gmail Address) in Gmail.

Configuring Your Gmail Account

Set up Gmail to use the JangoSMTP Relay.

1. Sign into your Gmail account.
2. Go to Settings in the upper right corner.
3. Click on the Accounts tab.
4. In the Send mail as: section, click edit info next to the account that you want to change. You should already have your business email address set up to send through Gmail. If you don't, click the Add Another Email Address option and follow the steps provided.
5. Hit the Next Step button.
6. Choose the Send through [your domain] SMTP servers option.
7. For SMTP Server, erase the default address and type in relay.jangosmtp.net
8. For Port, choose 25.
9. Type in your JangoSMTP Username and Password.
8. Save Changes
Gmail will now send your emails via the JangoSMTP Relay instead of its own servers. Enjoy the Open Tracking, Click Tracking, and all the other benefits of our SMTP service.


To view Gmail's announcement of this new feature, visit:
http://gmailblog.blogspot.com/2009/07/send-mail-from-another-address-without.html

Friday, July 31, 2009

Video Tutorials Now Available on Trackable SMTP Relay Configuration

JangoMail has two new Video Tutorials on configuring our SMTP Relay Service:

1. Using the JangoSMTP Relay with a Desktop Email Client

2. Using the JangoSMTP Relay on a Web Server

Watch these to learn how to configure the JangoSMTP Relay Service to work with a Desktop Email Client like Outlook, Thunderbird, and Lotus Notes and how to configure it for use on a Web Server. This new service improves your sending capabilities by offering these benefits:
  • Open Tracking
  • Click Tracking
  • DomainKeys/DKIM Signing
  • Easy web-based access to SMTP Logs
  • Categorization of different types of transactional emails
  • API methods to retrieve Reporting data

Thursday, July 16, 2009

Bug fix: Using the unsubscribe link in transactional emails

We have fixed a bug that prevented the unsubscribe link from working properly in transactional emails, including emails sent with the trackable SMTP relay.

To insert an unsubscribe link into transactional emails, do so the same way as you would with a regular email broadcast campaign, using a snipped of HTML code:

Just link to this URL:

http://x.jango9.com/u.z?***uniqueid****

and be sure to replace x.jango9.com with your account's actual Tracking Domain. The system default Tracking Domain is currently x.jango9.com.

If you link to the above URL in a transactional email, the ***uniqueid**** will be replaced by the JangoMail email engine with a string unique to your recipient. Then, then the URL is clicked, the recipient will be added to your account's unsubscribe list, preventing said person from receiving future emails from your account.

Sunday, July 5, 2009

Frequently Asked Questions (FAQ) about the SMTP relay service

Q. How are bounces handled?

A. If you send an email message to an address that is on your account's Bounce list, then that email message won't be sent, and instead, a notification will be sent back to the sender with this error message:

Web Service Exception BouncedEmailAddressException: Email address is on account's Bounce list. System.Exception: JangoMailNamespace.BouncedEmailAddressException: Web Service Exception BouncedEmailAddressException: Email address is on account's Bounce list.

If you send an email message to an address that is not yet on your account's bounce list, but the recipient address is invalid, then that address will then be added to your account's Bounce list. If you wish to receive an email notification of the bounce-back, like you would with a "regular" SMTP service, then set the appropriate options under My Options and Settings --> Bounce Handling.

Q. How are unsubscribes handled?A. If you send an email message to an address on your account's Unsubscribe list, the email message will not be sent and instead an error notification containing the following text will be sent back to the From Address on the email message:
Web Service Exception UnsubscribedEmailAddressException: Email address is on account's Unsubscribe list. System.Exception: Namespace.UnsubscribedEmailAddressException: Web Service Exception UnsubscribedEmailAddressException: Email address is on account's Unsubscribe list.

You have the option to have the SMTP relay bypass your account's unsubscribe list and not perform this check. To do so, check the appropriate box under My Options and Settings --> SMTP Relay.
Q. How is word wrapping handled?
By default, the SMTP relay is set to wrap lines at 76 characters. Many of Microsoft's email clients wrap lines at 76 characters, so we chose this as the default. You can, however, customize this setting under My Options and Settings --> SMTP Relay. Most desktop email clients, like Outlook, Thunderbird, and Eudora already transmit the email to the SMTP server with proper word wrapping in place. Many programming-based components, like PHP, ASP, and ASP.Net email components that send email programatically via an SMTP server, may not do any word wrapping at all. It is for this reason that the SMTP relay will do the word wrapping at 76 characters by default. To prevent the SMTP relay from doing any word wrapping, set the Wrapping option to 0 under My Options and Settings --> SMTP Relay

Q. Can I use the standard JangoMail unsubscribe link in my email messages sent via the SMTP relay?

A. Yes, you can. Just link to:

http://x.jango8.com/u.z?***uniqueid****

x.jango8.com can be replaced with the Tracking Domain specific to your account.

Q. My email client sends emails encoded in base 64 or quoted-printable. Will there be any issues with this?

A. Everything will work fine. JangoMail's SMTP relay will not only preserve your email client's original encoding scheme, but it will also still be able to add the open-tracking and click-tracking entities to your email message.

Q. What are the costs to use the SMTP relay?

A. The pricing is based on the number and size of the emails you send per month. Pricing is at http://www.jangosmtp.com/Pricing.asp.

Q. What happens if I attempt to send more emails through the SMTP relay than my account allows?

A. If your account is marked as an "overage allowed" account, then you will never encounter this issue. If your account does have set limits, as most do unless you've requested otherwise, then when your emails exceed your account limits, the sender will get return notifications indicating that the account is over limit and that the email was not delivered.

Q. Is my email message delivered to my recipient instantly through the SMTP relay?

A. Your email message is delivered within 3-5 seconds after it arrives at relay.jangosmtp.net. That 3-5 seconds is required for processing, such as adding the open-tracking and click-tracking mechanisms, signing with DomainKeys (and DKIM), and checking against your account's Bounce list.

Q. Can click-tracking affect phishing filters?

A. Yes, depending on the email program that the recipient is using. Since click-tracking alters your original URL, spam filters may detect this as a phishing attempt. The smarter email clients get though, the less of an issue this will become over time. Additionally, if your display text itself isn't a URL, then there won't be an issue. For example:

This is the best web site. (good way to link)

versus

http://www.google.com/ is the best web site. (bad way to link)

Q. What happens if I send email from either an IP address or a From Address that I have not yet authorized under My Options and Settings --> SMTP Relay?

A. An error notification will be sent to the Sender of the email message with the IP and From Address infomation:

Relaying denied for [IP Address] / "Joe Smith"

Tuesday, June 16, 2009

PDF Document now available on Trackable SMTP Relay feature

The official PDF guide is now available:

http://www.jangosmtp.com/JangoSMTP-Tutorial-SMTP-Relay-Tracking.pdf

Read this step by step guide to learn how to track every single person to person email that you send. The new SMTP service has lots of benefits over your existing SMTP service:
  • Open Tracking
  • Click Tracking
  • DomainKeys/DKIM Signing
  • Easy web-based access to SMTP Logs
  • Categorization of different types of transactional emails
  • API methods to retrieve Reporting data
Use it with Outlook or any desktop email program. Use it with your web page scripts that send email (ASP, ASP.Net, PHP, JSP, all web platforms are supported). Use it anywhere you designate an outbound SMTP server.

Friday, June 5, 2009

New Feature: Trackable SMTP relay now in beta

Today we have launched a feature into beta, that no other email marketing service provider has -- an SMTP relay service built specifically for email marketers. Any JangoMail active account holder can test it right now.

You can now send all of your person-to-person and transactional emails through the JangoMail SMTP relay at relay.jangosmtp.net.

The benefits of relaying your individual email messages through relay.jangosmtp.net instead of your corporate email server or your ISP email server are:
  1. Open Tracking
  2. Click Tracking
  3. SMTP Logging
  4. DomainKeys/DKIM signing
  5. Automatic plain text and HTML message generation
  6. Grouping of different types of emails into different categories for ease of reporting
We will soon be publishing a detailed document on how to use the SMTP relay service, but for now, follow these steps:
1. Login to your account and go to My Options and Settings --> SMTP Relay.
2. Review the settings and setup an authentication scheme, either by IP Address or by From Address.
3. If you choose to authenticate by From Address, then your email system will have to authenticate into the SMTP relay service with your JangoMail account username/password. Additionally, all of your emails must come from the From Address(es) that you specify under My Options and Settings --> SMTP Relay --> From Addresses.
4. After you've setup your authentication and tracking preferences, start relaying your email through relay.jangosmtp.net. You can connect on port 25 or port 2525.
5. All Reporting is in real-time under Reporting --> Transactional Emails.
------------------------------------------------------
Update on 6/15/09: Official PDF document now available at
http://www.jangosmtp.com/JangoSMTP-Tutorial-SMTP-Relay-Tracking.pdf