Link to home
Start Free TrialLog in
Avatar of saskia
saskia

asked on

relating url in e-mail

How do i send an url with an e-mail (which my script automaticly send to someone). The idea is that if the receiver clicks on the url which is located in the e-mail message, he/she will be taken to my site. A script must then be able to find out who clicked on the url.
Avatar of marko020397
marko020397

I think the best would be to send the multipart MIME message
via email. Body part of the message would also have HTML
where you could make a link to your page. A link should look
something like this.

&lt;a href=mycgi&gt;http://mylink</a>;

In your cgi program you should then look who clicked on
the link and then get the user to your site. For a more detailed
description you will have to increase points.
He,

This can be easily done by calling your webpage with a querystring. For example:
www.mypage.com/homepage/index.cgi?user

where user is the the one you sent the email to.

good luck
Hi Marko,

How do I rewrite the link:

&lt;a href=mycgi&gt;http://mylink</a>;

so that a description will appear instead of the complete url. And where does mycgi stand for ?
Avatar of ozo
Avatar of saskia

ASKER

Adjusted points to 35
Avatar of saskia

ASKER

$mailserver="/var/qmail/bin/qmail-inject -t";
open(MAIL,"|$mailserver -t")||die "can't open sendmail\n";
print "Send to: $form{'EMAIL'}!!\n";
print MAIL "To: $form{'EMAIL'} \n\n  ";
print MAIL "From: $test \n\n";
print MAIL "Subject: $test \n\n";
print MAIL "Reply-to: $test \n\n";
print MAIL "Welcome $test \n\n";
print MAIL "&lt;a href=mycgi&gt;http://mylink</a>this is a test";       ####< Help me out on this line please
close (MAIL);
 }
}
print "done\n";

Please look at ####< Help me out on this line
This is where I'm talking about, it must be a descripted url, but I keep getting the <a href ....>
sentence in my e-mails when I test the script. Can someone tell me what lines I need to change/Add ?
ASKER CERTIFIED SOLUTION
Avatar of marko020397
marko020397

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of saskia

ASKER

ok, not exactly what i ment but it will do. tnx