Contact form linking from "From:" header

2004-01-04 14:30:23
Hi all,

The discussion about hiding email addresses made me play with an alternative to mailto-links that allows a visitor of an archive to email the message author via a contact form. I made use of the CPAN module CGI::ContactForm, and it proved to be surprisingly easy to set it up:

1) I converted the "From:" header to a hyperlink to the contact form script by editing the resource file. The message ID is appended to the URL as a query string.

2) The contact form script uses the message ID to grab the "From:" header from .mhonarc.db. This is the script that serves as a 'link' between MHonArc and CGI::ContactForm:

(So far it's a 'quick-and-dirty' fix. I suppose that it would be advisable to URI encode the message ID, for instance.)

This is the demo archive:

To see that it works, please feel free to send a test message to mhatest at and click the "Update" link at maillist.html. :)

The solution should effectively keep the spammers away. Please let me know if you see any disadvantage worth mentioning.

Gunnar Hjalmarsson

<Prev in Thread] Current Thread [Next in Thread>