|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello-
i am hosted with the free www.freedom2surf.com and all i want is a small form that sends the results to my email. i have a cgi script that will do what i want, but do not know what to do next. i read on f2's site that the script can be uploaded to the www. folder, as well as cgi-bin. anybody done this with f2s before? |
|
#2
|
|||
|
|||
|
You can simplify what you want to do by making the action of your form mailto:<address>, where <address> is the address to which you want to send the information.
__________________
Michael
|
|
#3
|
|||
|
|||
|
yes, but that would give out the email address of the person that is sending the email (can be a problem when privacy is an issue).
To install that script that you have, first make sure that all variables are correct. For example, make sure your sendmail is reflected in the sendmail variable in the script. Then, upload your script to the www directory (or any directory, f2s does not care where it is put). Once there, chmod the file to 755. Then, all you have to do, is create a form that sends the desired information to the script. If you would like more help, check out this link: http://www.users.f2s.com/faq/formmail.php3 or email me at cbreits23@home.com and I will set one up for you. |
|
#4
|
|||
|
|||
|
cbreits23--
thanks for the help! i was able to get the script and form to work. however, now i am having problems configuring it to send to multiple recipients. thanks again for your help |
|
#5
|
|||
|
|||
|
What kind of problems are you having?
|
|
#6
|
|||
|
|||
|
well, just having one recipient is fine, but when i try to use two....
<input type=hidden name="recipient" value="myemail@hotmail.com"> <input type=hidden name="recipient" value="anotheremail@hotmail.com"> no email is sent to either address. i've also tried: <input type=hidden name="recipient" value="myemail@hotmail.com , anotheremail@hotmail.com"> once again, 1 recipient is fine: <input type=hidden name="recipient" value="myemail@hotmail.com"> i'm probably missing something very small. ...like in the perl script itself. i think i will check there right now! |
|
#7
|
|||
|
|||
|
Well, why don't you try this: Put all of your recipients in a file, like this:
$name1|$name2|$name3|etc... Then, in your script, open that file, read it, split it by |. Then store them into an array called @names. then, use the following piece of code to send your emails... $length = @names; for($i = 0;$i<$length;<++$i) { open(MAIL, "| $mailprogram -t"); print MAIL "To: @names[$i]\n"; print MAIL "From: $myaddress\n"; print MAIL "Subject: my subject\n"; print MAIL "whatever you want to have in your email...\n"; close(MAIL); } That piece of code should find the number of names (stored in $length), and then loop through all of the names in the array, sending an email to each of them. Have any questions? Feel free to ask (don't know if I explained it well enough or not). |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > www.f2s.com email form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|