Everyone using the internet on today’s date would have sent an email. If you are a programmer, chances are high that at least one of your applications sends out an email communication.
It’s not complicated, and there are enough libraries available in the market that can make this job much more easier as well.
How do Applications Send out Emails?
Similar to requesting a resource from an API over HTTP, we can programmatically establish a connection to an SMTP server, use our credentials to authorize that connection and send an email.
And similar to using libraries to establish an HTTP connection and establish communication between a client and a server, there are libraries available to handle the technicalities involved in establishing a secure connection with an SMTP server and sending an email.
But sometimes, sending out an email is not enough; we also need to track if readers are even reading the content, and this plays a big part in deciding the effectiveness of email marketing tools.
So, how is tracking implemented?
The most convenient way to implement a tracker is to set an appropriate header while sending an email, and the email client will send us a read receipt when a user reads the mail.
The challenge with the above approach is -
The Client can opt not to send a read receipt.
Email clients like google do not send a receipt back to the sender.
Another approach is to send a unique tracker pixel along with the email body.
While sending emails, marketing tools insert a 1 px X 1 px image in the email body. When the reader opens that email, the email client tries to download that image from the given API, passing a message to the sender that the email was opened.
That’s it? one might ask, and the answer to that is Yes, that’s it.
Isn't it interesting that one of the most effective solutions we use today is built on a simple and plain technique?