i have made a static site with only html static pages but now i want a contact us from where in one can recieve the info entered by user via mail.so, basically i want to know whether i can send email using HTML like using javascript or something if yes then please help.
Asked
Active
Viewed 2,455 times
3 Answers
1
You can't send an email with just HTML (From the Front-End) unless you don't mind interacting with a third party service provider which can do the back-end process for you.
Otherwise, you need to use the Back-End, the most common and easiest way to do this is with PHP.

MarioRicalde
- 9,131
- 6
- 40
- 42
-
fine. will try by aspx pages that seems to be the best now. – daljeet Oct 24 '11 at 09:54
-
I'm glad I could be of help. Cheers. – MarioRicalde Oct 24 '11 at 09:56
1
Your "send mail" code would ultimately have to execute on the server, which requires a postback from the HTML page, but the HTML page (or its (script) contents) can't (and shouldn't, even if possible) use local (the user's) settings and facilities to send email.

Grant Thomas
- 44,454
- 10
- 85
- 129
0
NO! JavaScript can’t email a form! but, there are alternatives to send the form data to an email address.
PHP mail()
function is the best in my eye. Read more about it here: PHP mail() function

Akos
- 1,997
- 6
- 27
- 40