This sends an email with an image embedded that identifies the subscriber.

Now, for the view to handle the image request. It must return a valid image or else your html email will often have a broken image icon. Here’s how to pass back an image in django:

def track-open-emails(request):
if 'id' in request.GET:
#do something with the id, which tells you that specific subscriber has opened the email.
#do something to record that an email has been opened.
image_data = open("/path_to_image/", 'rb').read()
return http.HttpResponse(image_data, mimetype="image/png")