Link to home
Start Free TrialLog in
Avatar of Partitioner
Partitioner

asked on

Sending mail via form

Hello,

I'd like to have a form on my site, which will be like all other "Contact Me"s out there. Anyone can write something in the form, and when pressing "send", the text will be emailed to an address I set beforehand in the code. It is very common, I jsut don't know how to do it, and with which language. The code someone offered me is:

<FORM name="emailme" method="post" action="mailto:name@domain.com ?SUBJECT=sent" enctype="text/plain" onSubmit="return true">

<input type="submit" name="submit" value="send">

This doesn't work (Windows asks me for my SMTP server, my email, etc.)

Any ideas?
Avatar of Batalf
Batalf
Flag of United States of America image

This

<FORM name="emailme" method="post" action="mailto:name@domain.com?SUBJECT=sent" enctype="text/plain" onSubmit="return true">

is a method used to send data from your form by your default mail program.

It looks to me that you

a) Don't have the correct mail program associated with your browser(Tools->Internet Options->Programs in IE) or
b) Haven't configured a mail account

The code above works in my browser by the way.

Batalf
Avatar of Partitioner
Partitioner

ASKER

That's the thing, I don't want the code to be dependant on the user's default email program. I want the "send" button to be the only thing the user has to do. In most websites this doesn't open your email program (like a simple emailto:blah@blah.com).

Do you understand what I mean? i'm searching for an example now.
ASKER CERTIFIED SOLUTION
Avatar of Batalf
Batalf
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok, that's what i thought, but i wasn't sure. thanks a lot.