Click to See Complete Forum and Search --> : send form info through email
dhermes
03-10-2003, 03:19 PM
I have created an html form and would like to be able to send it to an email address. I don't need any kind of script for this to work on macs, but it does not work on pc's. Is there any javascript that can be used to send the form showing the variables to an email address?
khalidali63
03-10-2003, 03:27 PM
action="mailto:enail@mail.com" should do it,
is that what you were looking for?
Khalid
dhermes
03-10-2003, 03:45 PM
It seems when I use action=mailto: email@wherever.com
all that happens on a pc is that the email program opens up and a new email is ready to be sent to email@wherever.com.
I'm actually wanting to have the form sent through email, but without the email program opening up.
Does that make sense?
boojum
03-10-2003, 03:47 PM
you dont need any client side scripting, you need server side. more info necissary
[ post your form and cgi script, so people can help you]
dhermes
03-10-2003, 03:51 PM
http://www.smithads.com/information.html
you can look at my form here and see that the action is set to my email address.
This works perfectly on a mac but not on pc's.
khalidali63
03-10-2003, 04:04 PM
Is ther e particular reason you have encttype set to enctype="application/x-www-form-urlencoded">?
and second instead of method= get use post
enctype for plain email should be
enctype="text/plain"
Typically the email app should not open with these settings
Khalid
dhermes
03-10-2003, 04:05 PM
I haven't done a form like this before, so I wasn''t sure what the encryption type should be. I will take your advice and see if that makes a difference.
Thanks.
dh
boojum
03-10-2003, 04:08 PM
thats not an official mime type and i have not seen mailto used like that so maybe its a mac centric trick. normaly you have some parsing program that you post your form to, and it sends the email
khalidali63
03-10-2003, 04:23 PM
Originally posted by boojum
thats not an official mime type..........
Yes it is,here are allowed enctype values
"application/x-www-form-urlencoded" "multipart/form-data"
"text/plain"
:D
Cheers
Khalid
boojum
03-10-2003, 04:35 PM
i thought
http://www.isi.edu/in-notes/iana/assignments/media-types/media-types
had all the official mime types? its not on the list
khalidali63
03-10-2003, 04:41 PM
That might be true,But we are talking about HTML related enctypes,here is what HTML4.01 spec says
enctype = content-type [CI]
This attribute specifies the content type used to submit the form to the server (when the value of method is "post"). The default value for this attribute is "application/x-www-form-urlencoded". ....
Here is the link
http://www.w3.org/TR/html401/interact/forms.html#adef-enctype
Cheers
Khalid
dhermes
03-10-2003, 04:45 PM
The post method worked fine on a pc, however, it is still requiring an email client in order to send the email. If your email client is not set to send messages automatically, you physically have to open up outlook, or whatever you are using and hit the send button.
I'm trying to figure out how to send through the internet rather than through an email client. I know you can do this with other programming languages, but was wondering if there is a java script for forms that can send the form results to an email address.
Thanks
khalidali63
03-10-2003, 04:48 PM
Will be interesting to find out,I still think that there has to be an email client on the clients PC to send email,
:D
Lets see
Khalid