5

I'm writing a little script to send emails and I would like to track who opened the email with the python module pytracking like so:

import smtplib
import pytracking
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
fromaddr = "info@XXXXXXXXXX.com"
toaddr = "XXXXXXXXa@gmail.com"
msg = MIMEMultipart()
#Not sure if this is the right location for the pixel
pixel= (pixel_byte_string, mime_type) = pytracking.get_open_tracking_pixel()
msg['From'] = fromaddr
msg['To'] = toaddr
msg['Subject'] = "grande"
body = "bla bla bla"
msg.attach(MIMEText(body, 'plain'))

server = smtplib.SMTP('mail.XXXXXXXX.com', 587)
server.ehlo()
server.starttls()
server.ehlo()
server.login('info@XXXXXXXX.com','XXXXXXXX')
text = msg.as_string()
server.sendmail(fromaddr, toaddr, text)
print('DONE')

I read the full documentation of this module here , but I can not find from where to actually check if the pixel has been opend or which command shell I run to do so.

Can anyone advise how to check if the pixel has been opened? Thanks

ChameleonX
  • 87
  • 1
  • 10

0 Answers0