There are basically two parts of the email system:
- Email sender
- Email tracker
I am going to show you, in a small block of code, how to send an email using Node.js with the tracking code inside the email. However, it won't be production grade (this is our assumption).
The email tracker, however, will be a production-grade design; this tracker will receive the event from the email and update the database accordingly. We will discuss which database API to use and everything else in the upcoming section.
Now, for the sake of design, here is a diagram:
As you can see in the preceding diagram, the email sender will pick up the record from some source which will contain an email list and send out emails to lots of people.
When people open, click on, and read those emails, the email tracker will track those events and record them in the database.
Now, system design is not just the diagram design; it has lot of things within it, such as capacity estimation, database diagrams...