Thursday 21 June 2012

DPMailSniffer ~find out if your email has been read ~




Now you can find out when your email has been read by the recipient! No more guessing: "Has he or she read my email yet?".Use sniffer anytime on anyone: Your business contact, cheating girlfriend, ex-husband, stranger you met online, or just anyone who doesn't respond to your email and needs to be "verified." Just sniff them ;-)

There are already some sites providing this ,still you can develop your notification system very easily and customize as you wish.
Mail-sniffer a simple email tracking system that sends you a notification by email when the recipient opens your message.


Note : Both you and the recipient must use an HTML email, not plain-text or rich-text email.(yahoo,gmail,hotmail all the modern ones supports this)


The Simple logic behind this tracking is to have a image from your application being included to the mail being sent(of course secretly),so when the mail is opened the request comes to your application for downloading the secret(invisible) image which you have included in the  mail,now you can investigate the request and get the details.


Step 1: Have a form with from mail and the subject of the mail.


Step 2: Create a secret image (some white image ) or you can have some visible image backing your signature in the mail.Have your own logic to map the email id and subject entered in the above fields mapping to the image created.Image should be in your application running on the server(intranet or internet )

Step 3: Copy the image (select the image and CTRL+C) and paste it at some place in the mail being sent(CTRL+V) and send your mail as usually.

So when ever the recipient opens the mail,the image should be downloaded from your application running and the request comes to your application.

Say for example you have included some gif (secret empty)image in the mail.The following bits of code will help you in getting hold of the request.

web.xml 


<servlet>
<servlet-name>spy</servlet-name>
<servlet-class>com.dp.controller.SpyServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spy</servlet-name>
<url-pattern>*.gif
</url-pattern>
</servlet-mapping>


check the request and identify which image is being requested for.We have already stored the from id and the subject mapped to a particular image file in Step 2.Use this from id and the subject to notify that the particular mail sent is being opened by so and so using the following kind of  servlet.


SpyServlet :


/**
 * 
 * @author DurgaPrasad.K
 *
 */
public class SpyServlet extends HttpServlet {

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {

System.out.println(req.getRemoteAddr() + " - - " + req.getRemoteHost()
+ "- - " + req.getRemotePort() + "- - " + req.getRemoteUser()
+ "- - " + new Date(System.currentTimeMillis()));
//notify the user

}
}

Your app must be hosted to the intranet or internet as per your requirement.That's all for now.


Cheers...Thanks for reading   :-) :-)