How to send form data to email id by using JavaScript

M

Malli mindwave

Hi,

I want to send form data to given email id, I'm using
mailto:[email protected], but it doesn't working
it dirsctly goes to localSystem A/C i.e outlook..

<form name="form1" method="post"
action="mailto:[email protected]"
enctype="text/plain">

<table width="100%" border="0"
cellspacing="0" cellpadding="0" valign="top">
<tr>
<td width="19%" height="28"><div
align="right"><font face="Times New Roman, Times, serif">Name:</font></
div></td>
<td width="79%"><input
name="textfield" type="text" size="22" width="150%"></td>
<td width="2%">&nbsp;</td>
</tr>
<tr>
<td height="30" width="19%">
<div align="center"><font face="Times New Roman, Times, serif">EMail</
font>:</div></td>
<td><input name="textfield2"
type="text" size="22" width="150%"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="29"><div
align="right"><font face="Times New Roman, Times, serif">Phone:</
font></div></td>
<td><input name="textfield3"
type="text" size="22" width="150%"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="22" colspan="3"><div
align="left"><font face="Times New Roman, Times, serif">Comments/
Queary
:</font></div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td rowspan="2"
valign="top"><textarea name="textarea" rows="5"></textarea></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="82">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit"
name="Submit" value="Submit">
<input type="Reset"
name="Submit2" value="clear">
</td>
<td>&nbsp;</td>
</tr>
</
table>
</form>


Please check this one.
 
E

Erwin Moller

Malli said:
Hi,

I want to send form data to given email id, I'm using
mailto:[email protected], but it doesn't working
it dirsctly goes to localSystem A/C i.e outlook..

<form name="form1" method="post"
action="mailto:[email protected]"
enctype="text/plain">

<table width="100%" border="0"
cellspacing="0" cellpadding="0" valign="top">
<tr>
<td width="19%" height="28"><div
align="right"><font face="Times New Roman, Times, serif">Name:</font></
div></td>
<td width="79%"><input
name="textfield" type="text" size="22" width="150%"></td>
<td width="2%">&nbsp;</td>
</tr>
<tr>
<td height="30" width="19%">
<div align="center"><font face="Times New Roman, Times, serif">EMail</
font>:</div></td>
<td><input name="textfield2"
type="text" size="22" width="150%"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="29"><div
align="right"><font face="Times New Roman, Times, serif">Phone:</
font></div></td>
<td><input name="textfield3"
type="text" size="22" width="150%"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="22" colspan="3"><div
align="left"><font face="Times New Roman, Times, serif">Comments/
Queary
:</font></div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td rowspan="2"
valign="top"><textarea name="textarea" rows="5"></textarea></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="82">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit"
name="Submit" value="Submit">
<input type="Reset"
name="Submit2" value="clear">
</td>
<td>&nbsp;</td>
</tr>
</
table>
</form>


Please check this one.

Hi,

The answer is simple: JavaScript don't send email (luckily).
Send your formdata to a server, and let the server send the mail, eg via
PHP.

Regards,
Erwin Moller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top