mksalva
asked on
Do Mailto Forms Only Work On Web Servers?
I want to make a mailto: form that will sit on our network. It will only be for in-house users.
Will this work is the page is just a file on our network? Or does it have to be on a web hosting server to work?
I tried this:
<form action="mailto:me@myemail. org" method="post" enctype="text/plain" name="form1" onSubmit="MM_goToURL('pare nt','thank s.htm');re turn document.MM_returnValue">
The goToURL part works just fine, but I didn't get the e-mail.
What do I have to change?
Thx!
Will this work is the page is just a file on our network? Or does it have to be on a web hosting server to work?
I tried this:
<form action="mailto:me@myemail.
The goToURL part works just fine, but I didn't get the e-mail.
What do I have to change?
Thx!
ASKER
We have Outlook on our computers here, mine included, but when I clicked Submit, that did not happen. Did I leave out something essential?
No you put something bad in.
Take out the onsubmit event entirely.
Take out the onsubmit event entirely.
ASKER
I removed the onSubmit event and it worked. So onSubmit events are a no-no for this sort of thing?
Also, when the e-mail arrived, the subject line read "Form posted from Microsoft Internet Explorer." Is there a way that I can customize the subject line?
Thanks for your help.
Also, when the e-mail arrived, the subject line read "Form posted from Microsoft Internet Explorer." Is there a way that I can customize the subject line?
Thanks for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If I only use the action, then all the words in the completed fields have plus signs (+) where the space bars should go. For example, if I type "This is a test" in a text field, the result in the e-mail looks like this:
This+is+a+test
If I use <form action="mailto:me@domain.o rg" method="post" enctype="text/plain" name="form1"> then the text looks normal:
This is a test
Is there an easy way to use the second method and still get a customized subject line?
Thx!
This+is+a+test
If I use <form action="mailto:me@domain.o
This is a test
Is there an easy way to use the second method and still get a customized subject line?
Thx!
That is the default encoding and I'm not sure that you will be able to change that.
If you want to add JavaScript to the mix, you could add onchange="javascript:this. value=esca pe(this.va lue)" to each field...
then you'll likely get This%20is%20a%20test but it may display correctly in the e-mail.
If you want to add JavaScript to the mix, you could add onchange="javascript:this.
then you'll likely get This%20is%20a%20test but it may display correctly in the e-mail.
Mailto is really a horrible way to send mail from a web server.
If you have IIS, and can install the SMTP server, then you can send via ASP:
http://www.rodsdot.com/ee/How_To_Send_Email_ASP.asp
If you have PHP you can use the mail function.
If you have IIS, and can install the SMTP server, then you can send via ASP:
http://www.rodsdot.com/ee/How_To_Send_Email_ASP.asp
If you have PHP you can use the mail function.
ASKER
What is IIS? (I'm ignorant, I know...)
I just want to have a way for folks in our organization to send me requests for web site changes online.
Thx!
I just want to have a way for folks in our organization to send me requests for web site changes online.
Thx!
What is your web server's operating system?
In your case you usurped the default action (e.g. open the client) with the call to the thank you page and especially the return document.MM_returnValue part.