Formmail.pl

liunx

Guest
I am trying to get a form to work, but it keeps talking about a formmail.pl on my site, do I have to create that file? Or is there a easier way to create a form for like feed back and support.<!--content-->
formmail.pl is a forms processing script. You need a script named that or some other forms processing script to collect the info and send it on.<!--content-->
Ok, after 3 hours I finally got it to work, but what I want to know, is when I use a script, and send it, I get it in my email with a from line like this:<br /><br />"[email protected]"<br /><br />have can I get it to say:<br /><br />[email protected]<br /><br />Thanks<!--content-->
The script needs to send mail sort of like this for that to happen. <br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$mailprog = '/usr/sbin/sendmail -t';<br />$recip = "you\@yourTCHdomain";<br /><br />open (MAIL, "|$mailprog -f$recip");<br />print MAIL "Reply-to: you\@yourTCHdomain\n";<br />print MAIL "From: you\@yourTCHdomain\n";<br />print MAIL "To: $E_Mail\n";<br />print MAIL "Subject: Your message has been received\n";<br />print MAIL "\n\n";<br />print MAIL "Thank you ".$First_Name." for using our on-line message form.\n";<br />print MAIL "\n";<br />print MAIL "We will respond to your query as quickly as possible.\n";<br />print MAIL "\n";<br />print MAIL "You submitted the following:\n";<br />print MAIL "\n";<br />print MAIL "Name:          ".$First_Name." ".$Last_Name."\n";<br />print MAIL "E-mail:        ".$E_mail."\n";<br />print MAIL "------------------------------------\n";<br />print MAIL "Comments:      ".$Comments."\n";<br />print MAIL "------------------------------------\n";<br />print MAIL "\n";<br />print MAIL "If you require a response you should receive one within 48 hours, if not please submit \n";<br />print MAIL "this information again by replying to this message.\n";<br />print MAIL "\n";<br />print MAIL "Thank you,\n";<br />print MAIL "\n";<br />print MAIL "\n\n";<br />close (MAIL);<!--c2--></div><!--ec2--><!--content-->
thanks for the reply, but I am confused as to what I do with it, where do I put a file like that, sorry if I am sounding like a noob, but I look thought the web and it is so overwhelming that I have a hard time decivering it all.<br /><br />Thanks<!--content-->
The script I posted is written in Perl. It usually goes in the cgi-bin folder and is called with <br /><br /><form <b>ACTION="cgi-bin/mailscript.pl" method="post"</b>><br /><br />in your HTML page.<br /><br />Maybe NateMail would help you.<br /><br /><!--coloro:blue--><span style="color:blue"><!--/coloro-->http://www.mindpalette.com/formprocessing/index.php<!--colorc--></span><!--/colorc--><!--content-->
Cool, thanks, does tyhis replace the formmail.pl? If so I like this a whole lot better.<br /><br />Thanks for your help Bruce!! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/tchrocks!.gif" style="vertical-align:middle" emoid=":tchrocks!:" border="0" alt="tchrocks!.gif" /><!--content-->
Well it could but I don't know if it will. This is part of a script that I use on my company's website. The full script does a lot more than send a message to the person that filled out the form which is what this snippet does. I only posted this part to show how to create the headers so the server does not send mail as serverXX.tchmachines.com<br /><br />The <b>-f$recip</b> on the <!--coloro:blue--><span style="color:blue"><!--/coloro-->$mailprog<!--colorc--></span><!--/colorc--> line authenticates <b>$recip</b> as the sender of the message. The Reply-To and From lines set up the message for the email client.<!--content-->
 
Top