Submit Contact Form without using PHP

user1301836 picture user1301836 · Apr 16, 2012 · Viewed 12.8k times · Source

I'm still a student and today our lecturer told us that the only way in order to submit a contact us form without having to use the mailto: function is to use PHP.

I swear that last year another lecturer showed us a way using only javascript.

Is it possible to submit a feedback/contact form using a basic form and javascript ? If so, do you mind sharing a sample example ?

Thanks in advance

Answer

Brad picture Brad · Apr 16, 2012

You can use JavaScript to redirect to mailto: with some parameters, but that isn't ideal. Also keep in mind that anything beyond an e-mail address in a mailto: URL is non-standard. While it will work for many browsers, it won't work for everything.

The best way to send e-mail is to do it server-side, using PHP or something else.