/    Sign up×
Community /Pin to ProfileBookmark

Submitting a form to an email address

When you have a form and a submit button, is it possible to use JavaScript to send the contents of the form directly to an email address?

I am imagining there is a simple way to do this, but I can’t find anything on this subject.

The following code simply brings up outlook, but is there a more direct way to do it?

<form action=”MAILTO:[email protected]” method=”post” enctype=”text/plain”>
Name:<br><input type=”text” name=”name”value=”yourname” size=”20″><br>
Mail:<br><input type=”text” name=”mail”value=”yourmail” size=”20″><br>
Comment:<br><input type=”text” name=”comment”value=”yourcomment” size=”40″>
<br><br>
<input type=”submit” value=”Send”>
<input type=”reset” value=”Reset”>
</form>

Can someone help me with this noob question?

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@neil9999Aug 01.2005 — No you can't do it with javascript. You can use a server side language like PHP. See http://hotscripts.com/PHP/Scripts_and_Programs/Form_Processors/index.html for some examples.

Neil
Copy linkTweet thisAlerts:
@brendandonhueAug 01.2005 — And this forum is not for javascript, see how the description says [B]Not JavaScript[/B] ?
Copy linkTweet thisAlerts:
@chadz001authorAug 03.2005 — ^ Ooops. Sorry.

Thanks for the link neil.
Copy linkTweet thisAlerts:
@rhsundergroundAug 06.2005 — moved to Javascript for reference
Copy linkTweet thisAlerts:
@crazycoderAug 06.2005 — You need a script. I have a free php one here:

http://www.revengeofthekillersnowgoons.com/form2mail.zip
×

Success!

Help @chadz001 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...