Sending Simple HTML email

Go To StackoverFlow.com

0

i have a simple contact us form and i need to send an email on submit.i tried with "mailto" in my local machine and it's not working.is there any other simple mechanism to send an email in HTML.following is the code i'm using now

<html>
<body>

<h3>Send e-mail to someone@example.com:</h3>

<form action="MAILTO:yourmail@mail.com" method="post" enctype="text/plain">
Name:<br />
<input type="text" name="name" value="your name" /><br />
E-mail:<br />
<input type="text" name="mail" value="your email" /><br />
Comment:<br />
<input type="text" name="comment" value="your comment" size="50" />
<br /><br />
<input type="submit" value="Send">
<input type="reset" value="Reset">

</form>
</body>
</html>
2012-04-04 03:06
by chamara
You can't send an email with pure HTML. You need a server side tool (cgi, php, java, .Net...) to process your HTML form and send the email, directly or through a mail server. What server side technology can you use - JScoobyCed 2012-04-04 03:11
I am using Lotus Notes for my e-mails. Its opening up my Lotus Notes when I click Send button. From there I am able to send it. For this you need to set your default email client - sgowd 2012-04-04 03:11
do you want form to send email automatically or open email client and user can send manually? Is you are trying auto email this will not work. Check this link for issues with your tag and also other available options - http://apptools.com/rants/mailto.ph - rs. 2012-04-04 03:13


2

HTML can't send emails itself. You'll need a scripting language to do that.

mailto: goes inside an <a> tag's href attribute, like this:

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

However, that will simply open the default email client on the user's machine, if one is available and won't actually send anything by itself.

2012-04-04 03:09
by Colin Brock
Exactly. OP, keep in mind this will only launch the user's chosen mail client. It will not send an email - benjgorman 2012-04-04 03:12
Thanks @benjgorman - I was editing to include that while you were adding your comment : - Colin Brock 2012-04-04 03:13
ok thanx.i'll try using a scrpting languag - chamara 2012-04-04 03:33
Ads