“When I hit submit on my web form, all I get is a blank email message.”
This is a common complaint when some people use mailto web forms. You or your customer carefully fills out the form, but then, instead of mailing the form contents to the mailto address, it opens the email client.
“When I fill in the form, it sends a blank email with strange codes in the subject line”
Sometimes, the email client has a subject that looks something like:
?firstname.lastname@example.org&comments=these are my comments but the body of the email is blank. And sometimes, there is nothing from the form that is added to the email at all.
This is the Problem with Mailto Forms
Mailto forms rely on two things:
- The customer's system must have a default email client
- The customer's web browser must be able to connect to that email client
If you create a page with a mailto form, and your customer doesn't have an email client on their system, the mailto form won't work. If their web browser can't connect to the email client, the mailto form won't work.
This issue depends on many factors, including:
- operating system
- web browser and version
- email client and version
- other unknown factors
What Can You Do to Fix Broken Mailto Forms?
If you are a web developer using forms, and you want to use a mailto form, you should be aware of this limitation. No matter what you do, some of your customers may not be able to use the form.
The Best Solution for Broken Mailto Forms
I strongly recommend that you use a CGI or PHP script instead of a mailto form. There are many ways you can use a CGI even if you don't know how to program. Here are some resources that can help:
- Feedback forms - Use these email feedback forms for your web forms.
- Write Your Own CGI—Using Perl or other CGI language, you can write your own CGI to process the form. The benefit to this is that you can make the CGI do whatever you need.
This article is part of the HTML Forms Tutorial