0

I wanted to know how to send e-mail using javascript. I dont want to use long functions with tag n all other stuff. Interested in only one/two liner statement which will allow me to send mail.

I have used something like that earlier :

function sendmail(_frm)
{
var eml="[email protected]";
var bod="&body="+_frm.selOne.value+" ¦¦ "+_frm.txtOne.value;
var subj="?subject=Whatever you want";
location.href="mailto:"+eml+subj+bod;
}

At Form tag
<form action="mailto:[email protected]" 
enctype="text/plain"
method="POST" onsubmit="sendmail(this);return false;">

I dont want to use above approach to send mail...

Please provide me your suggestion so that i can send mail very easily by using javascript , like below. e.g.

function sendmail () {
location.href="mailto:<other stuff>"
}

Is anyone has any idea about this, please share their ideas here.

Thanks a lot....

1 Answer 1

1

As far as I know there is no other way to send an e-mail from client side with javascript. You can write some server side code or you can find some service to send e-mail. Unfortunaltely I dont know any web application that gives that kind of service. But, I was writing a web application that have limited e-mail functionality added. It is not finished yet (but still usable).Address is http://postdatabase.appspot.com Like I said it is not finished yet, that's why I suggest you to find a completed product. if you decide to use it please contact me from the site, so I can be more carruful to make changes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.