By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,675 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

Formmail.pl assistance

P: 1
Hello. I'm attempting to write a form for a web page which is using the formmail.pl script. The form works fine and all but it its the script in which i am having troubles. What I would like it to do is to relay a confirmation e-mail with the data to the sender, but also send an identical mail to a specified admin address for collecting the data. The form current sends data to just the admin address. The other issue which I am encountering is how to get the data from all fields in the html page to relay to the body portion of the e-mail. It current sends all the data from the other fields (groupname,email ect...) within the body, but the name (realname) is placed within the header of the e-mail.

This is the form portion of the html page

Expand|Select|Wrap|Line Numbers
  1.  
  2. <FORM METHOD="POST" ACTION="/cgi-sys/formmail.pl">
  3.  
  4.  
  5.         <INPUT TYPE="hidden" NAME="recipient" VALUE="anemail@email.com">
  6.         <INPUT TYPE="hidden" NAME="subject" VALUE="Registration">
  7.         <INPUT TYPE="hidden" NAME="env_report" VALUE="REMOTE_HOST,HTTP_USER_AGENT">  
  8.         <INPUT TYPE="hidden" NAME="redirect" VALUE="http://www.awebaddress.com/submit.html">  
  9.         <INPUT TYPE="hidden" NAME="sort" VALUE="order:realname,groupname,phone,email,tickets,time,message">
  10.  
  11.         Your Full Name (As group contact) :  <BR>
  12.  
  13.         <INPUT NAME="realname" TYPE="text" size="30">
  14.           <BR> <BR>
  15.  
  16.         Name of group :  <BR>
  17.  
  18.         <INPUT NAME="groupname" TYPE="text" size="30">
  19.           <BR> <BR>
  20.  
  21.         Phone number :  <BR>
  22.  
  23.         <INPUT NAME="phone" TYPE="text" size="14" maxlength="12">
  24.           <BR> <BR>
  25.  
  26.         Please enter your e-mail address : <BR>
  27.  
  28.         <INPUT NAME="email" TYPE="text" size="30">
  29.            <BR>  <BR>
  30.  
  31.         Number of Tickets required :  <BR>
  32.  
  33.         <INPUT NAME="tickets" TYPE="text" size="5" maxlength="3">
  34.           <BR> <BR>
  35.  
  36.         Time Attending :  <BR>
  37.  
  38.         <SELECT NAME="service">
  39.             <OPTION VALUE="5:30">5:30</option>
  40.             <OPTION VALUE="8:30">8:30</option>
  41.         </SELECT>
  42.  
  43.         <BR> <BR>
  44.  
  45.         Anything else we should know :  <BR> 
  46.  
  47.         <TEXTAREA NAME="message" cols="35" rows="4" wrap="virtual"></TEXTAREA>        
  48.  
  49.         <BR>  <BR>  <BR>
  50.  
  51.         <INPUT TYPE="hidden" NAME="required" VALUE="email,realname,groupname,phone,tickets,service">
  52.  
  53.         <INPUT name="Submit" TYPE="submit" VALUE="Submit">
  54.         <INPUT name="Reset" TYPE="reset" VALUE="Reset">
  55.  
  56.     </FORM>  
  57.  
  58.  
http://www.megaupload.com/?d=KL0BY3XA
That is the link to the formmail.pl version that i am using. Sorry bout the megaupload but it was the only way i could save using major amounts of lines.

Thanks in advance for anyone who is able to help me out on this.
Jul 11 '08 #1
Share this Question
Share on Google+
1 Reply


numberwhun
Expert Mod 2.5K+
P: 3,503
I would suggest that you learn a little bit of Perl CGI before trying to tackle this. That way, you can then look at the formmail.pl script and try to make the modifications you speak of. If you get stuck, post your code here and we will try and help you get it working.

Regards,

Jeff
Jul 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.