Anyone know how to make a form submit to e-mail

phillydog

Senior member
Dec 19, 2001
472
0
0
All...

Looking for a way to have an HTML form submit the information in the form to my e-mail. I do not want to use javascript to have it open in the user's default mail client, but rather use some form action to submit under the covers as some companies do (such as Sony, B+H, etc.....)

I think ASP, JSP, or CGI (maybe Perl) could be called from form, but I am not sure. I would prefer not to use ASP, since that is Microsoft proprietary, but I am running WIN/2003, so something is better than nothing.

Also, all items would need to be hosted on this same server, and not outsourced to some other site for processing.

Sorry if this seems demanding, but trying to learn the technologies, and I would like all stuff to be on my same box. One day, I hope to move the webserver from WIN --> Linux, which is why ASP would be the least prefered choice.

ANY information is appreciated.
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
http://files.amdfanboy.com/

See the mail link on the top. Like that ? I can give you the php class if you want. Edit: I think they use a DB, not email. Have you thought of doing that or using flat files like XML ?
 

jfall

Diamond Member
Oct 31, 2000
5,975
2
0
FormMail will do the trick, its cgi/perl -- very popular script. You simply post your script to the formmail script and it processes it and sends it via e-mail
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
I used php's basic mail function - found the script somewhere here ... pretty simple to implement because I'm not that php savvy.
 

phillydog

Senior member
Dec 19, 2001
472
0
0
Originally posted by: amdfanboy
http://files.amdfanboy.com/

See the mail link on the top. Like that ? I can give you the php class if you want. Edit: I think they use a DB, not email. Have you thought of doing that or using flat files like XML ?

Your e-mail submission is nice, however, I would need it to be redirected to e-mail and not a file or database. Also, I know nothing about PHP... is it already setup on WIN/2003 to automatically handle PHP, as it is with ASP/JSP?
 

phillydog

Senior member
Dec 19, 2001
472
0
0
Originally posted by: jfall
FormMail will do the trick, its cgi/perl -- very popular script. You simply post your script to the formmail script and it processes it and sends it via e-mail

This appeared simple, but I think I am missing something since all references are for Unix.

I put the FormMail.pl in my /cgi-bin web-alias which points to C:\InetPub\Scripts (which has execute access)

My HTML form looks like this:

<HTML><HEAD>
</HEAD><BODY>
<FORM action="/cgi-bin/FormMail.pl" method="POST">
<input type="hidden" name="recipient" value="phil@phillydog.dynu.com">
<INPUT TYPE="Submit" name="submit" value="submit">
</FORM>

</BODY></HTML>

Although, not sure if the action is wrong since I get:

The page cannot be displayed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
--------------------------------------------------------------------------------

Please try the following:

Contact the Web site administrator if you believe that this request should be allowed.
Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
HTTP Error 405 - The HTTP verb used to access this page is not allowed.
Internet Information Services (IIS)


Do you have a sample PL and HTML that you can e-mail to My E-mail ?