Email tracked when sender opens the email - email

I am working on tracking emails using pixel image. It is tracking the email and increasing the read count when the receiver is opening the email.
The issue is, it is also tracking the email and increasing the read count when the sender is opening the email.
What should I do so that the email is tracked only when the receiver opens the email?
Thanks in advance!

A sender can open an email which normally gets saved in his/her Sent folder.
Suppose an email is send by a sender. Then a copy of this email would normally be saved in Sent folder of sender. Now, a copy of email is saved in Sent folder via IMAP or proprietary WebMail or Mobile Application. You can easily embed appropriate pixel image in email when it gets saved in Sent folder via WebMail or Mobile Application because you yourself create the email MIME. When email is saved in Sent folder via IMAP, then you might need to parse the email MIME and embed appropriate pixel image in email which is send by IMAP Client to be saved in Sent folder.
*Modifying the email saved in folder via IMAP Client is normally not done.

Related

Read the content of an email sent over via SMTP?

I am currently setting an email server that sends out an email using smtp, I've used smtpfaker to check whether the mail is actually being sent, but cannot see the content of the mail using that application is it somehow possible to read, just to be sure that the content is correct.

Email open tracking

I have to create email tracking system, but the problem is that when the sender opens an email this is counted as an opening by the recipient.
When I send an email through Polymail (or some other tools for tracking emails), then in the 'sent' folder I have an email without a tracking pixel, but the recipients of this email have the pixel and at the same time everyone have different code inside (I think, to determine which of the recipients opened the email).
How is this possible? The sender and the recipients have different contents of the same email. Can this be implemented using smtp / imap / gmail-api?
For standard IMAP/SMTP setups (specifically: not GMail), the message is submitted twice, once to SMTP to be sent, and again to IMAP to be placed in the Sent mailbox.
There is no requirement that these be the same: in fact, in normal use, the BCC header, for example, is submitted to IMAP, but not SMTP.
GMail, and a few others, while trying to be helpful and save bandwidth, do the copy automatically, but make it impossible to supply different versions. (Unless you want to try to find the duplicates and delete them out of band).
Current Email protocols don't send any kind of ACK to the Sender when mail is opened. So you need to put some kind of analytic tool inside the mail contents to keep the track of it.
Some suggested methods and widely used tool is Bananatag.
Alternatively, you can use custom Google Analytics for the same. Refer here https://dyn.com/blog/tracking-email-opens-via-google-analytics/

Verify E-Mail Delivery and Readership

When sending an email, is there a way to find out:
User has received the email (displayed in user's inbox).
User has read (and at what time) the email.
If it's not possible, what prevents it from finding out? What is the route an email message follows from sender to receiver.
When you send an email, the email is transferred through a series of servers using SMTP (Simple Mail Transfer Protocol). Once the email reaches it's destination it is stored into the recipients directory. To retrieve and read the email, the recipient uses and email client like Outlook to that connects to the server via IMAP/POP3 which tells them how many new emails they have and delivers each message to the client. In order to get this information, the user must provide their credentials.
So, in order to get this information you would need to know the imap/pop3 server(s) for the recipient's domain, as well as the recipient's login credentials (which would give you full access to the recipients email account). Basically, this is not possible.
This article gives a nice simple overview of how email gets sent over the internet.
You can, and you do not need the credentials as mentioned in the selected answer.
Lets imagine you are using apache and php + mysql.
You send person x an email,
In the email you have an embedded image (your logo) which resides on your server.
the url of the logo in the email, points to a file on your server:
example.com/logo.png?userRelatedId which is a php file.
with an htaccess (apache) you can state that logo.png gets executed with php and in fact forwards a real image and correct mimetype but before that identifies userRelatedId, and saves in your database with the time the file was accessed,
Meaning the email was read by person x and the time which the logo was accessed (email was looked at).

How can a read receipt be suppressed?

I am programmatically "reading" emails using WebDav. I am also deleting these emails when I've finished having my way with them, however, this is causing an interesting problem. Each time I delete an email the original sender is getting a not read response. I have logged into Outlook Web App and checked the option Do not automatically send a response but this doesn't seem to help.
Is there ANY way to remove the request for read receipt from the email before deleting it?
We decided that we didn't want to make any modifications to our server and a solution that could be implemented in my existing program would be the most ideal.
I read on a few sites if the email was marked as read through IMAP commands on the exchange server that the read receipt would not be sent when deleted/opened via the client (Outlook Web App or Outlook). So that is what we did:
Logged into email server via IMAP
. LOGIN user#mailserver.com password
Selected the folder to process
. SELECT Inbox
Made the changes to all emails in the folder
. STORE 1:* flags \SEEN
This sequence marks all the emails in the inbox as read, which then allows my program to delete the emails after processing without a receipt being generated.

How can I check if an e-mail has been read using POP3/SMTP?

How can I check if an e-mail has been read using POP3/SMTP?
I am able to read e-mails, but I can not figure out if the e-mail has been read or not. Any suggestions are appreciated.
There is no completely reliable way to do this, while some servers support Read receipts it is dependent on the client to respond to the receipt request.
Another way people do this is by embedding a tracking image into an HTML email that will get pulled from a server and that hit constitutes the read however this is often not accurate as most email reader block html external content by default.
Sign up for a free account on statcounter.com. Goto the install code options, choose invisible tracking button and HTML only counter. Statcounter will now provide you an HTML Image snippet that you have to insert inside the body of your HTML email message.
The image isn't visible in the email but the person will have to click "Display Images" when they open their email client.
This is about the only way you can do it if your server or client does not support read receipts.
With POP3, emails are almost always deleted from the server after they are read. When a client connects to a POP3 server, the server usually transfers emails to the client and then deletes the email from its own storage. So, if you can read an email, chances are that it hasn't been read.
As far as I know this is a client side only detail when it comes to POP3. If you wanted to have the status reflected on multiple clients you'd need to used IMAP. With web mail readers they keep track of the unique message ID and whether or not it has been read on the client, but if you were to load it on a desktop pop3 client, it would not be flagged as read.
store the latest read email's message-id somewhere and check when you run to pop
There is no guarantee an e-mail has been read or not, especially 2 cases we won't receive a Read Receipt,
When user opens an email for the message a pop-up confirmation window opens, if user selects No then end user wont receive a read receipt.
From email settings, If user selects Never send a read receipt then also end user wont receive a read receipt.
If user enabled Read Receipt then, the request for the receipt is sent as a header attached to the mail using the method
MimeMessage.setHeader("Disposition-Notification-To", "email-id#domain.com");