![]() |
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.
|
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 :) |
Thanks I actually have. I don't like their scripts. I was able to find one that I liked.
|
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
|
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. |
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 |
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. |
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).
|
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. |
All times are GMT -8. The time now is 08:15 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project