Open detection technique When you send an email to someone, normally you have no idea whether he/she receive it or not. When he/she receive it, you have no control what he/she is going to do with it. Just like you are sending a regular mail. You give it to postman; That is all.

However, many email marketer found it very useful if we can know who open our email and at what time. There is an official way of knowing who open your email. It is to ask receivers to send a read receipt. This is done by adding an extra header field to email message. Many email clients support this function. However, not so many people would like to send a receipt back and it is annoying people a little bit to ask them for a receipt.

So what marketers want is a way to track opening without receivers noticing it. In technique, this is possible because many email messages are sent in the format of HTML.

In the HTML source code of email message, we can add additional 1px white image at the end of source code. When email clients such as Ms Outlook receive that message, email clients will do a request to the server for that image file. On the server side, we can then add code to log the request.

For example, we can add below code to the end of an email message. An image file must start with tag with a src attribute. However the file name of that image does not have to be an image like file name such as .gif or .jpg. It can be of anything. On img.aspx page we can add code to log IP and value on query string. After logging, server can response with an image file to email clients.

In this way, we have our open detection function.

Open detection is not very reliable because it only works with HTML email message and some people block image loading on their email client.

How to handle bounced email If you send email and it fails to arrive at its intended recipient for any reason (incorrect user name, network failure, etc.), the message "bounces" and returns to you. That is what we call “bounced email”

According to RFC, bounced email is returned to the email address in SMTP MAIL FROM command. Bounce address is different from the “FROM” address you see on your email message. They can be the same but they are two different things. The “FROM” name and address you see on your email message is added using SMTP DATA command, while bounce address comes from MAIL FROM command. SMTP server keeps a record of bounce address just in case that the email message is undeliverable, SMTP server can return that message to the bounce address. Bounce address does not appear any where in your email message. Some SMTP servers will add it as Return-path to the header of an email message, some servers will not do anything with it. According to RFC, SMTP server can take bounce address out after an email message reaches its destination.

When we send out a campaign to a big list, there will be many emails bounced. If we make bounce address same as FROM address, our people will get 100s or 1000s of bounced email in their inbox. This will not be a nice situation. So we have to use a different email address for bounced email.

How to handle bounced email?

Normal way We can use a different email address for bounced email. All bounced email will returned to that email address, so we can use a pop client to check that email account and process those bounced email.

Below is an example of bounced email. We can analyze the email text, find the email address which is undeliverable and mark it in the database.

Your message did not reach some or all of the intended recipients. Subject: will you come back? Sent: 01/17/2005 16:42 The following recipient(s) could not be reached:

'aabcde@planet.nl' on 01/17/2005 16:42 550 5.1.1 unknown or illegal alias: aabcde@planet.nl

This sounds like a good solution. However SMTP server will decide itself the content of bounced email. That means in above example, the email address "aabcde@planet.nl" can appear anywhere within the email message or even not in that message at all. This makes it not 100% reliable in handling bounced email.

Our special solution

We found out that by using a catch all account, the handling of bouced email become very simple.

In our application, in order to process bounced email automatically, you need to have a catch all email account.

Catch all account is a special email account which direct emails that sent to NotAvailableUser@yoursite.com to the email address of your choice. If you do not have extra catch all account available, you can simply ask your domain registrar to create a sub domain with a MX record for you, so you can use a catch all account such as xxxx@sub-domain.yoursite.com

We specify bounce address as news+{id}@yoursite.com. {id} contains id to identify that email address as well the list it belongs to. An example of bounce address is: news-g19e-14444332@umailcampaign.com

Our application will check that catch all account every 10 mins for any new message. If found, it will mark that email address in the database.

We do not mark every email address that was returned. We mark an email address as return by using below rules.

When an email address was returned, it will not be marked as “Return” immediately in the database. Application will start a counter to count how many time this special email address was returned. Only after an email address has been returned more than the "soft return times" defined in SETTING/global, it will be marked as return. Within the same day, for an email address, no matter how many times it was returned, it will only be counted as one time. If an email address does not return for half a year, the counter will restart. For example, if an email address was returned 2 times on 2003, after that everything goes ok. On Jan.2005, that email address was returned again, it will only be counted as 1 times instead of 1+2=3 times.

SMTP Server explained SMTP stands for Simple Mail Transfer Protocol, it is a protocol used to send e-mail on the Internet. SMTP is a set of rules regarding the interaction between a program sending e-mail and a program receiving e-mail. For detail information about SMTP, please refer to RFC 821 Simple Mail Transfer Protocol.

SMTP is Internet’s standard host-to-host mail transport protocol and traditionally operates over TCP on port 25. So for Windows 2000 or up user, you can do the following to send out an email message without any email clients such as Ms Outlook

• Click “start” --> “Run“, type “CMD” • Type “telnet“ then “enter”. Now you will be in the environment of Microsoft telnet client in which you can use commands to send out email message. • Type “open 25”, 25 means port 25. Now you are connected with your local SMTP server if you enable SMTP in your IIS.

Below SMTP example shows mail sent by Smith at host test.com to Jones and Brown at host beta.nl. S: means you, R: means response from server.

S: HELO yourdomain R: 250 OK

S: MAIL FROM:smith@test.com R: 250 OK

S: RCPT TO:Jones@beta.nl R: 250 OK

S: RCPT TO:Brown@beta.nl R: 250 OK

S: DATA R: 354 Start mail input; end with . S: Blah blah blah... S: ...etc. etc. etc. S: . R: 250 OK

Why you need a SMTP server

SMTP server is a mail server that supports the SMTP protocol for email transfer. SMTP server is the server that distributes email messages on Internet. Before your email message reaches its destination, it normally will pass several SMTP servers on internet. Those SMTP servers have the responsibility to make sure that your email message will be delivered to the right destination.

Our application will prepare your email message in the format that complies with RFC 2822 Internet Message Format and send it the SMTP server you specify in SETTING\global.

You need to specify a SMTP server which our application can communicate to for mail distribution.