[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

C#, VB6, Email

Posted on 2011-02-11
4
Medium Priority
?
272 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
PHP contact form that lets the user to contact the company through email contact form. A button is fixed at the bottom of site, on clicking a new window will open where a user can send the email.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Suggested Courses

649 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