0

I am trying to create a form for a pre-made form for other people to use, that emails the results of it to the client. The problem is, most of my clients don't support SQL, or PHP, so they and AJAX are not an option.

It should work something like this:

<form name="form" action="email()"
    <input type="text">
    <input type="slider">
    <input type="submit" value="Submit">
</form>

etc. Any idea how to do this without AJAX or a library?

5
  • Would this be an acceptable approach? Commented Feb 19, 2015 at 2:38
  • @Simon probably, if I can figure out how it works, and then make it work. Where's the mother W3Schools page? Commented Feb 19, 2015 at 2:45
  • I don't know where the parent page is, but it's pretty simple - it's all client-side, no backend required. The w3schools example is the entire source. The drawback is that it won't work if the user doesn't have a mail client installed... Commented Feb 19, 2015 at 2:53
  • @SimonMᶜKenzie so it won't work for around 90% of users... Commented Feb 19, 2015 at 3:22
  • Maybe your clients' hosting providers have a preinstalled email script - many do... Commented Feb 19, 2015 at 4:14

1 Answer 1

1

You have to have a server side component to send an email properly.

The email needs to be sent from a mail server. Spam would be a bigger problem than it is if you could send an email from the client side.

This article references posting directly to the MX server but it's unreliable.

See also here.

You can also send the email from a service like MailGun. Without doing this from the server side you risk exposing your token to spammers looking for open ports.

A server is the correct and secure way to do it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.