Click to See Complete Forum and Search --> : Send email from without server side code


thisObject
02-05-2007, 10:33 PM
Hello,

Does anybody have a snippet of code that send an email that does not require server side programing?
I would like to use <form> tag and some input fields within this tag.
The idea that email would come to me like this:

First input field: user's input here
Second input field: user's input here
etc.

The major thing is that this needs to work in all major browsers :)

Thank you.

_Aerospace_Eng_
02-05-2007, 11:31 PM
Umm yeah not going to happen. The only thing you have is mailto: and even then not all users have a default mail client configured properly. If you want it to work in the major browsers then you'll need to resort to server side coding. Why don't you want to use server side coding?

joshua.toenyes
02-06-2007, 02:26 AM
thisObject,

It is very highly recommended that you use server side programs to send forms... and it is pretty easy, and most hosting companies already have these types of server side programs already installed.

However, if you really want to send a form without a server side script... use the following:

<form action="mailto:youremail@domain.com" method="post" enctype="text/plain">

form inputs go here

</form>

But, using the above method will not always work... not all browsers support using the "mailto:" in a form action, and not all users have their email clients properly configured, so by far the best way to do it is to use a server side program.

Hope that helps.

-Josh