Forum Moderators: coopster
What if JS is disabled?
JS raises issues with accessibility.
Js can be a begger to validate for XHTML.
I have looked at a few variations on formmail.pl / formmail.php but what I wanted was a simple mailto: for the masses
Here's what I come up with:
<a tabindex="0" href="<?php require 'mail2.php';?><?php require 'yourname.php';?>yourdomain.com<?php require 'subjectline.php';?>">Send us your questions</a>
mail2 pulls in the 'mailto:'
yourname puls in 'youname@'
subjectline (optional really?) calls '?Subject=Feedback_message'
The latter I use with procmailrc to validate. The subject line is either whitelisted, or not. Crude, but when you get a million Spam a month sledgehammers start to look appealing.
What you you reckon?
the key to this though is that harvesters are getting the same as client browsers. So what do you see in the browser?
It looks like it will just be a plain link if you view source.
PHP being server side you need something that can hide the address from the client side yet still make it usable, like js.
One method you can use is to use two email addresses depending on the user_agent variable for known harvesters, known IP addresses or perhaps the contact page could lookup a log file created and give out the junk mail for any IP which has requested pages far too fast to be a real user. You could use emails such as sales@.... and jsales@.... where jsales are automatically deleted at your email server or application you use.
It takes time, but you want all users to get the email address and no harvesters. I am afraid it is an impossible task, but certainly you can reduce the number of harvesters.