tags:

views:

58

answers:

4

I am working on a website. I am new to this field. I've made one website, but I have a problem in the "Contact Us" form.

In this form I made four textboxes, one "reset" button, and one "send" button. The problem is that when I click on that button, mail is not sent. What code do I have to use to send email?

A: 

You can use a form processor cgi script on the web server to send the message by email.

gw
A: 

Your understanding of how email is sent seems incomplete. Email will not be automatically sent by merely clicking on the submit button (thereby submitting the form). The form has to be submitted to "something", where the "something" is a program that will process the data submitted using the form and do the necessary things to send the data by email.

I don't know which programming languages you are familiar with. If there is any that you are using then you need to find out how to write a CGI script to handle this scenario using your favorite language.

Manoj Govindan
I am familiar with HTML Only. i don't know anything about CGI. but still i will try to do this. if you have any other option form email then please send me. Thank you for reply.
Jeyson
A: 

If you want to send emails from a form it would be a good idea to learn about server-side scripts.

I would start by finding out what software you have installed on your current server. Eg: is it a Linux server with Apache, MySQL, PHP, Perl etc... or is it a Windows server with ASP.Net etc... You can find this out from your host provider.

For security reasons I would not recommend writing your own script for sending emails until you know what you are doing. There are freely available scripts that do this fine.

Tectite FormMail is one example if you have PHP

Then you need to be able to upload your required scripts to the web server. Usually FTP access to the server is given for this task. And use the appropriate HTML to communicate with the script.

Alternatively:

There are hosted form options that may be worth checking out so you don't have to learn as much about server scripts. (this means some other web server does the email part all you manage is the HTML)

Here is a list of a few hosted options

Edit: Here is a better list of hosted options

Chris J
A: 

If your application is coded in java then this link will be able to help you. You can use JavaMail API to send mail.

Jaydeep