/    Sign up×
Community /Pin to ProfileBookmark

HTML/Javascript to collect and send email?

I have a simple html page with some javascript that will allow a user to type in the name of 4 Monopoly players. The script currently just randomizes the seating order of the players.

I would like to put a separate text box beside each player’s name for their email, when the randomize button is clicked I would also like to send the order to each player’s email.

Is this possible with any client side code? or do I have to recreate this page as PHP?
Thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@rtretheweyMar 16.2014 — You can't do this client-side. You'll need some kind of software on the server, be it a script written in PHP or some other language. The basics of such a script are pretty trivial. You could revise just about any formmail script you find to get it done. But it strikes me that this sort of script could easily be an open portal for SPAMmers, so you'll want to include some authentication/security so that it only sends the Emails you intend. Good luck!
Copy linkTweet thisAlerts:
@camo2013authorMar 16.2014 — Thanks for the quick reply, this is probably a silly question, but is there any way to leave the current page as a plain html page and just call for the execution of that script.

I didn't want to have to change the name of the page from x.com/x.html to

x.com/x.php
×

Success!

Help @camo2013 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 5.28,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...