ARTLUNG LAB Share

Started August 2001; Last Update January 2003

Form action mailto: stinks

Budding web developers love to get feedback on their sites. Budding web developers also love to use forms. The problem comes because most free or cheap hosts don't have much in the way of CGI or server-side programming. So how to use a proper feedback form? In many web-dev books they advise these folks to use the action type of "mailto" in a form action. This is a bad idea. Why? Browsers choke on it in a way other form actions don't choke. If no email client is set up, it can choke. They all seem to throw up a more-threatening-than-usual error message as well. Below are some examples of the draconian error messages:

Example Email Form

Source

    <form method="post" action="mailto:recipient@fake.dom" enctype="text/plain">
        <textarea name="your_comments" placeholder="Your Comments Here"></textarea>
        <input type="submit" value="Submit Your Comments">
    </form>