Can we send email from static website( html page)? without using asp.net or others(i mean no server side tech).


With javascript and html alone, it's not possible. Javascript is not intended to do such things and is severely crippled in the way it can interact with anything other than the webbrowser it lives in. You can use a mailto: link to trigger opening of the users registered mail client.

However, you can do a popup window to make a better approach of mailto: like this solution

var addresses = "";//between the speech mark goes the receptient. Seperate addresses with a ;
var body = ""//write the message text between the speech marks or put a variable in the place of the speech marks
var subject = ""//between the speech marks goes the subject of the message
var href = "mailto:" + addresses + "?"
         + "subject=" + subject + "&"
         + "body=" + body;
var wndMail;
wndMail = window.open(href, "_blank", "scrollbars=yes,resizable=yes,width=10,height=10");

EDIT: Maybe you can't use server side, but you can use the formmail.cgi if your host provides one. Most hosts support this, and instructions for using FormMail are simple.


You could do that, but you can't guarantee the result.

The following code is legit:

<form method="post" action="mailto:my_adress@my_website.com" enctype="text/plain">
  <!-- some inputs here, with a submit of course -->

But before you do that, please read this. It will show you the dangers of using that.


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.

see this


With no server-side coding, you have only one option to send email via HTML and that is

<a href="mailto:emailaddress">Email</a>
  • If you are interested in using third-party code, the www.mycontactform.com is a good place to go. It allows you to create an email form for your users and send email. You can just copy their HTML code and paste it to your static site. – zdesam Jan 23 '13 at 6:34
