?
Solved

C#, VB6, Email

Posted on 2011-02-11
4
Medium Priority
?
271 Views
Last Modified: 2012-05-11
Hi All

I have a CMS program that is written in VB6 that manages member databases for clubs etc.

Given the prevalence for Email trackers ie. Respond when someone opens your email or clicks on a link. I was looking to build this type of tracking into my app. This is not a SPAM program as batch emails are sent to only members in DB who are opted in for such contact.

I am happy to build this in either VB6 or Interop with C#.

Any ideas where I start with this, haven't found anything handy online.

FLOG51
0
Comment
Question by:FLOG51
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 34872659
1. Create a GenericHandler that renders an image of 1x1 pixels (blank content)
2. This handler will receive a QueryString variable, this variable will contain the unique id for your e-mail (I propose the use of GUID)
3. Each time your GenericHandler receives a request, it takes the query string variable and then you can update your database recording the activity.
4. In your e-mails, send an image element that points to your GenericHandler with the unique query string variable
0
 

Author Comment

by:FLOG51
ID: 34878344
Hi jorge_toriz:

Ok, I get the idea of what you are suggesting, but can't get my head around how an image can be triggered to send a response to Handler on email being opened.

Can you point me in the direction of some sample code on this subject?
Thanks
FLOG51
0
 
LVL 15

Accepted Solution

by:
jorge_toriz earned 2000 total points
ID: 34879342
Tracker.ashx code:

<%@ WebHandler Language="C#" Class="Tracker" %>

using System;
using System.Web;
using System.IO;

public class Tracker : IHttpHandler
{
    public void ProcessRequest (HttpContext context)
    {
        context.Response.ContentType = "image/jpeg";

        string trackingId = context.Request.QueryString["ti"];
        if (trackingId != null && trackingId != string.Empty)
        {
            //Update your database to say that e-mail with this trackingId has been readed
            /*
             * In your e-mail you must add a code like this <a src="http://www.yourdomain.com/Tracker.ashx?ti=kfhywejdasuiefhiasgf" />
             * The value of "ti" query string variable must be unique (I suggest the use of Guid.NewGuid().ToString())
             */
        }
    }
    public bool IsReusable
    {
        get {
            return false;
        }
    }
}

You will be referencing this generic handler inside the e-mails that you will send to verify when your e-mail are being read
0
 

Author Closing Comment

by:FLOG51
ID: 34880198
Hi jorge_toriz

Spectacularly Perfect Answer:
Thanks very much, this gives me everything I needed to know.
Keep up the good work.
FLOG51
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question