In case you run the http server from your own host, you DO NOT need any additional script.
*00% of all http server provide a log file containing (at least)
IP/address - date of connection - visited pages/files.

In case your server is hosted "outside", meaning that you do not control the server resources where your html pages are located
then you need to use a perl or php script (perl obviously is much powerful). BUT most of all, and here's the trap, you need a mail server to send emails.
Now the question is, how can you run an email server on a remote server that you do not control its resources.??