jml3188
08-10-2004, 10:02 PM
So I have just learned that my web host has disabled formmail cgi for security reasons...
They recommended finding an alternative script which is php. Does anyone know of a few off-hand? What do you recommend?
(And before you just link me to hotscripts.com, I have been there and couldn't find what I was looking for. Thanks.)
Thanks!
Doh004
08-10-2004, 10:24 PM
Hi there. I made a simple one for my site:
<?php
// The Subject of the email
$subject = "Doh Games Elite Membership Sign Up";
// The message of the email
$message = "Hello,\n
You recently submited a request for elite membership from Doh Games.
This email contains all of the instructions to get you set up:\n
Step One - https://www.paypal.com/xclick/business=doh004%40aol.com&item_name=Doh+Games+Elite+Membership&amount=10.00&no_note=1&tax=0¤cy_code=USD Click that link (or copy and paste) to donate.\n
Step Two - http://www.dohgames.com/elite/add.php?email=$givemail . Click that URL (or copy and paste it) for your informaton to be added to the Doh Games system.\n
Step Three - Wait for you're confirmation email, this could take around 24-48 hours.\n\n
Thank you,\n
The Doh Games Team";
// Your name, or the site admin
$name = "Doh004";
// The return address you want responses to goto
$return = "doh004@gmail.com";
mail($givemail,$subject,$message,"Domainname.com <$givemail>");
?>
Now all you have to do is have a simple form on a diff page with an input field with the name of "givemail"
<form action="sendemail.php" enctype="multipart/form-data" method="post">
<input type="text" name="givemail"><br>
<input type="submit" value="Send"></form>
Thats how mine works. Go here to see it: http://blair.ddihost.com/~doh/index.php?page=elite
Oh and don't have <a href> links in the message. vB adds those in automatically ;)
jml3188
08-10-2004, 10:40 PM
Thanks.
I'm not sure if I described what I wanted, though. If this does work for what I want, I'm sorry. I'm a bit confused.
I have a form on a website. It has about 25 fields and when a guest fills it out on the website with their contact information and job details, clicks submit, I want it to be e-mailed to a specific e-mail address.
I used to use http://www.scriptarchive.com/formmail.html when I was with a host that I guess allowed formmail.pl.
Thanks.
Doh004
08-10-2004, 10:48 PM
Sure I was just giving you an example.
You need to add all of the form names into the $messge. Here's an example but I don't know which forms you want nor their names.
$message = "Hi $input1 , \n
You sent this email at $input2 to $input3 \n
Here is you're info: \n
$input4 \n
$input5 \n
$input6 \n
$input7 \n
$input8 \n
$input9 \n
$input10 \n
$input11 \n ";
Again I don't know what you want the message to be like and I don't know the variables you are using. You can customize the message with all of the info that is sent from the 25 input things from the form page before. Just ask for more help if needed. :)
jml3188
08-10-2004, 10:57 PM
Thanks for all your help.
SimplyDiff
08-11-2004, 09:27 AM
Be careful, depending on how you have it setup, it could do exactly what got formmail.cgi disabled (I have no idea why a host would globally ban all formmail.cgi scripts. I get just as many spam attempts with insecure .php "formmail" scripts).
From your description, you really want to hardcode $givemail in the script, otherwise you are allowing someone to send e-mail arbitrarily to someone else (which is why formmail.cgi got banned -- or so I would assume).
Taking Doh004's example. If I changed $givemail to the addresse(s) I wanted to spam. Make $input1 a name, $input2 and $input3 and $input5 to something and then the rest blank. And as we all know, the subject isn't of too much importance, but the hard-coded one will probably make people read it. This isn't hard to do for someone who comes to your site and checks out a few test e-mails.
Hi jml3188,
You sent this email at WebMD to notify you of our special offers.
Free male enhancement!
Get it all here.
Time to load up my address database and start the dirty work.