Interview Questions

How do I get form data emailed to me?

HTML Interview Questions and Answers


(Continued from previous question...)

37. How do I get form data emailed to me?

The only reliable mechanism for processing form submissions is with a server-side (e.g., CGI) program. To send form data to yourself via email, you should use a server-side program that processes the form submission and sends the data to your email address.
Some web service providers make standard form-to-email programs available to their customers. Check with your service provider for details.
If you can install CGI programs on your own server, see the answer to the previous question for a list of useful resources.
If you can't run CGI programs on your own server, you can use a remotely hosted form-to-email services. Note that the provider of a remotely hosted service will have access to any data submitted via the service.
Forms that use action="mailto:..." are unreliable. According to the HTML specifications, form behavior is explicitly undefined for mailto URIs (or anything else other than HTTP URIs). They may work one way with one software configuration, may work other ways in other software configurations, and may fail completely in other software configurations.

(Continued on next question...)

Other Interview Questions