jayson Posted March 14, 2007 Share Posted March 14, 2007 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. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted March 14, 2007 Share Posted March 14, 2007 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. Quote Link to comment Share on other sites More sharing options...
jayson Posted March 14, 2007 Author Share Posted March 14, 2007 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: "nobody@server112.tchmachines.com" have can I get it to say: me@jaysarahandy.com Thanks Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted March 14, 2007 Share Posted March 14, 2007 The script needs to send mail sort of like this for that to happen. >$mailprog = '/usr/sbin/sendmail -t'; $recip = "you\@yourTCHdomain"; open (MAIL, "|$mailprog -f$recip"); print MAIL "Reply-to: you\@yourTCHdomain\n"; print MAIL "From: you\@yourTCHdomain\n"; print MAIL "To: $E_Mail\n"; print MAIL "Subject: Your message has been received\n"; print MAIL "\n\n"; print MAIL "Thank you ".$First_Name." for using our on-line message form.\n"; print MAIL "\n"; print MAIL "We will respond to your query as quickly as possible.\n"; print MAIL "\n"; print MAIL "You submitted the following:\n"; print MAIL "\n"; print MAIL "Name: ".$First_Name." ".$Last_Name."\n"; print MAIL "E-mail: ".$E_mail."\n"; print MAIL "------------------------------------\n"; print MAIL "Comments: ".$Comments."\n"; print MAIL "------------------------------------\n"; print MAIL "\n"; print MAIL "If you require a response you should receive one within 48 hours, if not please submit \n"; print MAIL "this information again by replying to this message.\n"; print MAIL "\n"; print MAIL "Thank you,\n"; print MAIL "\n"; print MAIL "\n\n"; close (MAIL); Quote Link to comment Share on other sites More sharing options...
jayson Posted March 14, 2007 Author Share Posted March 14, 2007 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. Thanks Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted March 14, 2007 Share Posted March 14, 2007 The script I posted is written in Perl. It usually goes in the cgi-bin folder and is called with in your HTML page. Maybe NateMail would help you. http://www.mindpalette.com/formprocessing/index.php Quote Link to comment Share on other sites More sharing options...
jayson Posted March 15, 2007 Author Share Posted March 15, 2007 Cool, thanks, does tyhis replace the formmail.pl? If so I like this a whole lot better. Thanks for your help Bruce!! Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted March 15, 2007 Share Posted March 15, 2007 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 The -f$recip on the $mailprog line authenticates $recip as the sender of the message. The Reply-To and From lines set up the message for the email client. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
× Pasted as rich text. Paste as plain text instead
Only 75 emoji are allowed.
× Your link has been automatically embedded. Display as a link instead
× Your previous content has been restored. Clear editor
× You cannot paste images directly. Upload or insert images from URL.