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).
Related
I'm emailing to user with URI(s) in the message body. When the user will click that URI link, the app will answer the calls depending on the params on the URI.
However, all these should happen depending on which eMail account this URI is clicked from.
Eg. the system sent the email to thisUser#xyz.com. Then, the owner of thisUser#xyz.com forwarded the message to, say thatUser#xyz.com.
The system should be able to be aware that the URI sent to thisUser#xyz.comis being clicked by thatUser#xyz.com. Is there a way to make such distinction? How?
I can make the user verify his credentials-- enter his username&passwd but this is not what i'm looking for.
No, this is not possible, as the only information sent to the server is the URI, which is always the same.
Email clients do not send additional information about the recipient of an email to a server when the user clicks on a link in the email. Doing so would be a bad idea, because of privacy concerns, as it could be exploited for, e.g., farming email addresses using chain emails.
I'm working on the C# project whom allows the sender to send mail and:
Verify the receiver has read email or not?
Verify the receiver's email is located in Inbox or Spam...
Verify the receiver's email ip
Verify the receiver clicked the link on sender's email
I do not know how to start to deal with these problems :(
Thanks and appreciate you helps!!!
Short answer:
you can't do 1, 2 and 3 reliably/at all without deploying code/software on the receiver's side.
you can do 4 with link redirection.
On the basis that you don't have access to the recipient's computer, here are the long answer versions of patrix' short answer:
Verify the receiver has read email or not?
Unfortunately email has never been designed to let you know when an email has been received, and very few (and certainly no standard mail clients I know of) will report if an mail has been received correctly*, let alone opened. However, you can track emails sometimes by embedding an HTML image tag, and tracking when that image is downloaded from the server. There are a lot of caveats, such as it only working for HTML emails, and only if images are enabled, but that's one of the only 'reliable' methods for tracking email opens, and the most common method used by Mailing List providers (who need to think about this stuff a lot)
[* There is a feature known as 'read receipts' (technically Message Disposition Notifications or MDN) that many clients implement, but I believe few people ever use, which sends an email in response to reading an email. An email can request a read receipt by setting the appropriate header, but it is optional for the recipient to respond.]
Verify the receiver's email is located in Inbox or Spam...
Next to impossible; in the first instance, the concept of a 'spam' folder does not exist universally across all mail clients, and has never been a part of any email specification [to my knowledge]. In the second instance, as I mentioned, very few (if any) email clients report on the state of an email, let alone the folder it has been put into.
Verify the receiver's email ip
Again, not reliably, but you will make some headway in this if you implement image-based tracking as I mentioned in point #1
Verify the receiver clicked the link on sender's email
This is known as 'Clickthrough Tracking'.
This can be done, fairly 'easily'. Instead of providing a link directly to a location, you link to a tracking URL first. E.g. instead of linking to http://www.example.com, you should link to http://mydomain.com/TRACKINGID, which then redirects to http://www.example.com *. Then, on the server side, you can log when http://mydomain.com/TRACKINGID is visited. You can then put a unique tracking ID into every email for every recipient, e.g.
Recipient A receives a link to http://mydomain.com/TRACKIDA, and Recipient B receives a link to http://mydomain.com/TRACKIDB. both /TRACKIDA and /TRACKIDB redirect to example.com but, assuming you're logging HTTP requests, you can see who visited their link, where they visited from, when they visited the link, and how many times they visited.
This is the way all mailing list providers track clickthroughs, and roughly what you will need to do
[* Note that you will obviously require the relevant software to do this, e.g. with a 'simple' PHP page, or by using Apache mod_rewrite - whatever floats your boat, really]
My problem isn't validating an email address. I want to verify that an email address exists or not.
I have been looking solutions for that all day. But no result is useful to me.
Can any one help me with this? Thanks!
Ge.
This is not so trivial, but there are a number of options:
1) Find out, using DNS lookups, which mail servers are responsible for the domain of the E-Mail address and connect to one of them. Using SMTP try to deliver a message to the target address. Some servers will tell you at that point that the target address does not exist.
2) Send a test mail to the target address and check if you get a bounce/error mail back.
Not trivial, as badcat already said. If you absolutely have to, I would some other entity do the actual work of sending and receiving the email (such as your webserver). The flow would be something like
1) your app instructs your webserver to send a testing email (make sure you secure this - else it will be perfect for spamming)
2) your app instructs the user that a test email has been sent and that he should reply to it, confirming he's a human (or maybe click on a url contained in the email)
3) the users response (click on url or email reply) will be recorded in a small DB which you can query with your app
We provide a web service that can email invoices and statements from our servers to our users customers.
Our users have asked us that all emails sent from the web-service are also stored in the Sent Folder of the person using the web service.
We know the users email, and we could insist they provide us with IMAP access credentials.
What options do we have for saving emails sent by a user from our server in the Sent Mail folder of that user?
(hope that makes sense. It was pretty hard to explain)
Since this is internal, you might be able to get an easy way out. BCC the person that is 'sending' the email, then they can setup a rule that moves any emails sent from your web service outbound email (or however you can flag them) to move that email to whatever folder they want.
This keeps credentials out of the process and may help to keep your SMTP servers a little more stable as well for sending out these emails (not constantly having to deal with mistyped names/passwords).
If it is an internal employee (s), then why not
- add them as the addressee of the mails (to, cc or bcc)
- add a filter that when such an email comes (from this service, to you, cc you or bcc you, as the case is) send it to the 'sent' folder?
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");