Computing.Net > Forums > Programming > javascript and mail

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

javascript and mail

Reply to Message Icon

Name: cha-to
Date: October 22, 2003 at 15:46:15 Pacific
OS: win2k
CPU/Ram: 900mhz o/c celeron
Comment:

Hi all,

does anyone know if there is a way to send form data by email without using a cgi? I know I can use the "mailto", but I'd like to just send the form data on submit without having the user enter data thru their email client - I just want to populate the fields on the form (like "name" and "comment"), and when the user hits the submit button, it sends the form data by email without going to a cgi. My dad asked for my help in this (that's why I'm researching it now), and his web hosting provider doesn't allow cgi's to be executed (any executables actually), so I have to see if I can do it thru javascript. Can't seem to find anything on the internet on this subject, so I thought I'd poke the brains of experts here.

I told him I don't think it's possible, but I haven't dabbled in Javascript in years, so maybe things have changed...I hope?

If anyone's got pointers, or links, or suggestions, I'd appreciate it.

Thanks in advance for your help.

D.O.




Sponsored Link
Ads by Google

Response Number 1
Name: zeroguy
Date: October 22, 2003 at 17:40:15 Pacific
Reply:

I'm no expert on the subject by any means, but I don't think this is possible. JavaScript is client-side, and from what I think I'm reading, you want it to be server-side. I'm pretty sure you can only mail stuff via cgi or php or something. There is a way to do it with just an html form and no script, but I don't think that that would for you anyway.

-zeroguy


0

Response Number 2
Name: SN
Date: October 22, 2003 at 18:29:36 Pacific
Reply:

As zeroguy said, the strict answer to your question is No. I wouldn't expect any future versions of javascript to support this either...It seems like it would be too great a security risk. I'm also sure your users appreciate you not wanting to use the mailto method. This method is annoying and hardly ever works, so I'm glad you had the sense to avoid it.

Nevertheless, don't despair...All you know is that you can't use CGI in YOUR server...This says nothing about having your form go to a CGI on somebody else's server and have them e-mail the form results back to you. MadHaven posted a link to hostedscripts.com a while back...They'll do what you need and a lot more, all for free. I've never actually used their services (I would die without some kind of CGI on my accounts) but they seem to be good.

Hope this helps,
-SN


0

Response Number 3
Name: cha-to
Date: October 22, 2003 at 19:58:26 Pacific
Reply:

Ahhh, great idea :) I never thought of that, and I'll check into it for sure!

Thanks for your input folks!! Much appreciated!

D.O.


0

Response Number 4
Name: anonproxy
Date: October 22, 2003 at 20:28:30 Pacific
Reply:

Don't bother with this, but server-side javascript supports email. Honestly, aside from Netscape Enterprise and Sun iPlanet, you don't see this kind of thing very often.

http://docs.sun.com/source/816-6410-10/sendmail.htm



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: javascript and mail

Diff. b/w javascript and jscript www.computing.net/answers/programming/diff-bw-javascript-and-jscript/14428.html

help. beginner in javascript and vbscrip www.computing.net/answers/programming/help-beginner-in-javascript-and-vbscrip/2798.html

javascript email?????? www.computing.net/answers/programming/javascript-email/16115.html