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:

windows-ie-5
email-submission-win-ie-5.gif

windows-ns-6
email-submission-win-ns-6.gif

windows-ns-4
email-submission-win-ns-4.gif

windows-ns-3
email-submission-win-ns-3.gif

windows-opera-5
email-submission-win-opera-5.gif

macos-ie-5
email-submission-mac-ie-5.gif

macos-ns-4
email-submission-mac-ns-4.gif

macos-icab-252
email-submission-mac-icab-252.gif

webtv-viewer20-webtv-client-rom-2.2
email-submission-webtv-viewer20-webtv-client-rom-2.2.gif

osx-icab
email-submission-osx-icab.gif

osx-msie5.1
email-submission-osx-msie5.1.gif

osx-opera-5
email-submission-osx-opera-5.gif

osx-safari-1-beta, osx-chimera-navigator-0.6
email-submission-osx-safari-1-beta.gif
Note: Both Safari and Chimera open up emails in Mail.app with the destination address your form indicates. There is no guarantee that the user's information will be sent.

osx-mozilla-1.1
email-submission-osx-mozilla-1.1.gif



This is an example mailto action form below:

The code for that:

<form method="post" action="mailto:recipient@fake.dom" enctype="text/plain">
<input type=text name=your_comments>
<input type=submit value="Submit Your Comments">
</form>
blog comments powered by Disqus