formmail spam secured

hi andrew,

thanks for all your work in the recent years! i love your formmail as it easy and really good for modifications.

i was missing some features:

1. an easy anti-spam measure. integrated a litte calculation that has to be solved for email to be sent. no spam on my http://ff-webdesigner.de/kontakt-webdesignagenturen.html since 2 years. as easy as possible, still effective. simply put a new input field "spamcheck" into your form, write a little calculation in front and set up formmail spamcheck result inside the php.

2. i was enerved by having to put in www.domain.tld plus domain.tld. with my little change you can leave the domains with www. away, they will be put in automatically. had to change the while...list to a foreach for to make it work.

3. for security i will never ever do anything else but hardcode the recipient and referers directly into php formmail. for that i had to change the follow up of some lines (like decode_vars()) a little. all setup is being done in the block on top.

4. the hidden input field "title" in the form will be displayed as an answer on send ok.

5. i love to integrate the formmailer into my existing layout, so i changed the html output in a way that would allow me to put the whole formmail script in a html layout page.

6. logging: i didn't want to log formmail activities into apache logs, to inaccessible for my customers. set up variable $logging true or false. if true, logs are put to a specified logfile on the server. protect it via htacces, if needed.

no guarantee on all changes, comments welcome.
what would you say, some mods helpful enough to be permanently integrated in formmail? already did it in so many versions :-)

download the zipped hack here:
http://ff-webdesigner.de/downloads/formmail-ff.zip

cheers,
frank
www.ff-webdesigner.de

By ff-webdesigner.de on

Stalk me!

Drupal Association Member