-1

I am creating a Website as Static HTML pages. In that only in one contacts page alone and I need to get This information should be send to a particular mail Id with the information submitted by some one and when some one click send now button

please help me and let me know it is possible or not!!!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <div>
        <br />
        <h6>
            Contact Form:</h6>
        <form action="mailto:mymailid@companyname.com" method="post" enctype="text/plain">
        <table width="97%">
            <tr>
                <td width="145" align="left" valign="top" class="body" id="Company">
                    <strong>Company:</strong>
                </td>
                <td width="280" align="left" valign="top">
                    <input name="Company" type="text" size="30" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="top" class="body" id="Contact">
                    <strong>Full Name:</strong>
                </td>
                <td align="left" valign="top">
                    <input name="Name" type="text" size="30" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="top" class="body" id="Address">
                    <strong>Address: </strong>
                </td>
                <td align="left" valign="top">
                    <input name="Address" type="text" size="30" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="top" class="body" id="Phone">
                    <strong>Phone: </strong>
                </td>
                <td align="left" valign="top">
                    <input name="Phone" type="text" size="30" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="top" class="body" id="Email">
                    <strong>Email: </strong>
                </td>
                <td align="left" valign="top">
                    <input name="Email" type="text" size="30" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="top" class="body" id="Comments">
                    <strong>Questions / Comments: </strong>
                </td>
                <td align="left" valign="top">
                    <textarea name="comments" cols="25" rows="6"></textarea>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="submit" name="submit" class="button" value="Send Now" />
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>
Mr. Alien
  • 153,751
  • 34
  • 298
  • 278
Nitin
  • 25
  • 2
  • 7

1 Answers1

2

The short answer is NO, you cannot do that with static HTML website, you will need a server side code to process your form and send the mail or you can use vintage CGI Bin scripts to handle the form.

What the best you can make out of pure HTML is to use mailto: in your a tag.

<a href="mailto:demo@demo.com">demo@demo.com</a>

But beware of spam bots, it's better if you obfuscate that.

Mr. Alien
  • 153,751
  • 34
  • 298
  • 278