Jump to content

Setting Form to Send Direct Email?


jimbwayne

Recommended Posts

Hi All,I'm kind of new around these parts...first-time poster, anyway (i think). Good to be here.So I am wondering if there is a way to have a form send the received information from the input fields directly to an email inbox (rather than to a page on a defined server). Is there something I can do with the <action> or <method> tags to make that work? Here's what I thought would do the trick, but no dice:<form action="MAILTO:jim@xxxx.com" method="" enctype="text/plain"><b>Name:</b> <input type="text" name="name" value="" /><br /><b>Email:</b> <input type="text" name="mail" value="" /><br /><br /><input type="submit" value="Send"><input type="reset" value="Reset"></form>Anyone know what I'm doing wrong? I'm getting error messages with this. Or is this just not possible?Thanks so much in advance. Any intel would be much appreciated.Jim

Link to comment
Share on other sites

Hi All,I'm kind of new around these parts...first-time poster, anyway (i think). Good to be here.So I am wondering if there is a way to have a form send the received information from the input fields directly to an email inbox (rather than to a page on a defined server). Is there something I can do with the <action> or <method> tags to make that work? Here's what I thought would do the trick, but no dice:<form action="MAILTO:jim@xxxx.com" method="" enctype="text/plain"><b>Name:</b> <input type="text" name="name" value="" /><br /><b>Email:</b> <input type="text" name="mail" value="" /><br /><br /><input type="submit" value="Send"><input type="reset" value="Reset"></form>Anyone know what I'm doing wrong? I'm getting error messages with this. Or is this just not possible?Thanks so much in advance. Any intel would be much appreciated.Jim
I would say you need a mail server on your web server and some php if you want to send emails.http://www.w3schools.com/php/php_ref_mail.asp
Link to comment
Share on other sites

basically the method you are trying to implement is what is know as HTML mail (mailto:). It requires that the user has an email client installed on their local machine (i.e. Outlook). In order to get mail to send without having to rely on the users local settings, (the preferred way), is as ckrudelux suggests. Use PHP or some form of a server side scripting language and get the server to handle it. PHP has a built in mail() that is very simple to use and you will be able to find a lot of examples online for ways to accomplish it, and of course people here who will help you if you have any questions while you do it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...