Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing FROM address in html email

Status
Not open for further replies.

paul1026

Technical User
Nov 28, 2007
2
US
Is there a way to add javascript code to an html email such that when the client "receives"/"opens" the email, the javascript code can access the FROM email address and possibly send it as URL parameter to a php script at the web server?
I'm trying to determine those e-mail addresses of clients that have actually "opened" an email that I have sent.
 
Duh!! I mean accessing the TO address ... not the from address.
 
Don't use JS, as it's likely that many HTML email clients will strip this. Use the age-old technique of putting unique markup in each email, that requests a 1x1 transparent image with params, e.g.:

Code:
<img src="[URL unfurl="true"]http://www.yourdomain.com/someImage.gif?personsEmail=whoever@whereever.com"[/URL] />

Then skim the params from your server logs (for more help on this ask in the relevant server forum).

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Or better yet, instead of serving the direct gif - serve them an ASPX page that generates and serves the gif to them, but also throws a flag to your database, or notifies you with an email that their's has been read.

Unfortunately some mail clients block images by default and require the user to enable them, so this solution may not be 100% effective.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top