I want to create a form in which the user specifies the recipient. like a “tell a friend” form. Can anyone help me with the proper code for this? Or is it impossible using the Dreamhost formmail? any help is much appreiciated!


The standard form2mail script doesn’t work very well for this.

There are a variety of scripts at that may work out well for you.

You might want to check out the script I wrote for this. I use it at It automatically detects which page it was called from, so you can use exactly the same code on every page - which makes it extremely convenient for including in SSI files. It also has separate fields for username and domain, since AOL users seem to think that a screen name like “hot2trot” is a complete email address, instead of "" I offer the script for $35, installed.