Forms and the mailto Action
If your service provider does not provide a CGI-bin for scripts,
you can always use mailto in the ACTION field to
submit forms to your E-mail address. Here's a sample
form tag with mailto information:
<FORM METHOD = POST
ENCTYPE = "text/plain"
ACTION = "mailto:Fake@Nowhere.org">
The ENCTYPE="text/plain" submits form-generated E-mail
that is readable. Each form field appears on a separate
line in the mail, and there are no + where spaces should be.
This tag is supported by most major browsers except for
the AOL browser.
If you don't like seeing the "Form posted by Mozilla"
subject line, you can a produce a different
subject line like this:
<FORM METHOD = POST
ENCTYPE = "text/plain"
ACTION =
"mailto:Fake@Nowhere.org?subject=Comments from home">
<Input name = "Comment">
<Input type = submit value = "Send Comment">
</FORM>
This ?subject tag is incompatible with the CompuServe browser,
but it works with Netscape.
Internet Explorer handles mailto by opening a new mail message with
the address filled in,
but it does not insert the Subject line or message text.
It doesn't use an internal mail system, so that it
can work with many different mail systems.
These systems use different interfaces, so Internet Explorer
can't tell how to pass that information in a mail message.
The most dependable way to use e-mail with a form is through a
script or program
on the server.
Many ISPs provide such scripts to anyone with a Web site on
their servers.
Note: If you use a script that sends mail from your account to an
address specified in the web page,
someone could save your web source and hack it to cause your
server to send mail from your account to any address they want.
Also,
spambots
can find it and get you onto commercial mailing lists..
For security, use only programs or scripts that have the
destination address hard-coded or that only work
with web pages located on that server.
|