Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


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.



Up to => Home / Authoring / HTML / Forms




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers