05-21-2004, 07:05 AM | #1 (permalink) |
The Original JizzSmacka
|
PHP Form Mail Script
Does anyone have a PHP form mail script that I can look at the dissect? I'm looking for one that will allow the user to email anyone listed on a drop down menu.
__________________
Never date anyone who doesn't make your dick hard. |
05-23-2004, 07:50 PM | #2 (permalink) |
Know Where!
|
check out http://www.hotscripts.com/PHP/Script...ors/index.html
they have a few. the form mail script i use is perl so check out the link |
05-20-2005, 12:04 PM | #4 (permalink) |
Psycho
Location: Greenville, SC
|
Is php mail the best option for having a safe "contact us" option? I want to avoid the crazies, spybots and viruses attacking my mailbox and thus my computer. Thanks
__________________
"Sometimes a cigar is just a cigar." - Sigmund Freud |
05-21-2005, 09:10 PM | #5 (permalink) |
Crazy
Location: here and there
|
any sort of contact form will do that for you, it doesnt have to be php. the goal is simply to just not post the email address on the web.
depending on what you want to do, other languages may be better choices. for instance there is a cpan library (i forget the name right now) that will not only verify that the email address someone enters into your form is in valid form but will contact the users server and make sure the account exists.
__________________
# chmod 111 /bin/Laden |
05-23-2005, 10:27 AM | #6 (permalink) |
Too hot in the hot tub!
|
I really like the mail() scripting in PHP. There are some libraries that will do it for you behind the scenes, but unless you are wanting to make attachments to your mail, using the built-in will do just fine.
Lookup mail() on php.net
__________________
But I don't want ANY Spam! |
05-24-2005, 06:10 AM | #7 (permalink) |
Insane
|
theFez:
While I would agree with you, this doesn't always seem to be the case in modern times. Before the advent of UCE, contacting the server to determine the definitive existence of a mailbox would work wonders for mail submission forms. Nowadays, most SMTP servers (or rather, servers that are intelligently implemented) will tell the contacting application that the address does in fact exist (or not) and only then decide whether to actually act on the new mail message or not (depending on the innards of said SMTP server). I wouldn't rely on that now (although I have in the past with much success). A good regular expression match will do the trick. A connection, as well as the contacted server sending the UCE to /dev/null is probably cheaper.
__________________
"You looked at me as if I was eating runny eggs in slow motion." - Gord Downie of The Tragically Hip |
05-26-2005, 04:22 PM | #8 (permalink) |
Crazy
Location: here and there
|
yeah, i used that perl library for a school perl cgi project. it's pretty slick, but the delay between sending the email address to the server, connecting to the mail server, then sending the response back to the user is way too long (upwards of 5 sec).
__________________
# chmod 111 /bin/Laden |
06-01-2005, 06:41 AM | #9 (permalink) |
Junkie
|
If you want to send HTML mail instead of plain text, here's Richard Heyes' classic MIME mail builder PHP script.
For the contact list, just put the contacts in a database table or CSV file and populate the HTML select from that. You can use the select's onchange event handler to transfer the value of the selected option to your To: field. |
Tags |
form, mail, php, script |
|
|