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.
saskiaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

marko020397Commented:
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.
0
mr_whoCommented:
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
0
quickbasicCommented:
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 ?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

ozoCommented:
0
saskiaAuthor Commented:
Adjusted points to 35
0
saskiaAuthor Commented:
$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 ?
0
marko020397Commented:
From the above script I asume that you have sendmail program. Do you have the program metasend installed on your server? It is very easy to send the MIME multipart mail with metasend. Make a HTML page as it should appear in the mail. Then send the HTML via metasend. The syntax is as follows:

/usr/bin/metasend -b -t mail.address@domain.com -f mail.html -s Welcome -m \"text/html" -F my.address\@domain.com -D "Welcome mail" -S 99999999

To use the command from PERL use system command.

If you don't have metasend you will have to make a multipart MIME message by yourself. That is more complicated. Try to get metasend. If you can't get it let me know to show you how to make MIME mail by yourself.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
saskiaAuthor Commented:
ok, not exactly what i ment but it will do. tnx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.