?
Solved

How to hide email addresses used with FormMail Pearl script and HTML form OPTION values

Posted on 2005-02-24
5
Medium Priority
?
494 Views
Last Modified: 2010-04-06
I have created an HTML form to work with the free FormMail 1.92 Pearl script (see http://www.scriptarchive.com/formmail.html). I want to send an email to the appropriate contact depending on the visitor's choice from a combo box, but I want to do this without allowing spam search engines any way to see the email addresses. I'm guessing there is a way to do this with Javascript and there may be other better ways such as customizing the Pearl script FormMail. I'm looking for code to do this easily and effectively! Thanks.
0
Comment
Question by:Dan_JB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:cb1393
ID: 13395933
If the email address is contained in code that is processed on the server side, I'm not sure that it would be viewable by bots unless you have it displayed on the page somewhere.
0
 
LVL 4

Author Comment

by:Dan_JB
ID: 13396013
To do that I would need to customize formmail.pl which is certainly a possiblity if I know what to change.

Currently I'm just using a simple HTML form with code like this (which I presume would be viewable by bots as it is just in the HTML code):

<SELECT NAME="recipient">
      <OPTION VALUE="0" selected>-Select-</OPTION>
      <OPTION VALUE="employee1@domain.com">Customer Service</OPTION>
      <OPTION VALUE="employee2@domain.com">Sales</OPTION>
      <OPTION VALUE="employee3@domain.com">Careers</OPTION>
</SELECT>

The value of recipient determines who the form is sent to. This is actually an array passed to formmail.pl.

Dan
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 1500 total points
ID: 13397169
Just change it to mess up the spambots

instead of
employee1@domain.com

xemployee1_domain.com

Then just modify the perl script to drop the first character and replace the _ with @.  

There are any number of simple character replacements yu can do and then just convert it on the server side.

Cd&
0
 
LVL 4

Author Comment

by:Dan_JB
ID: 13405143
I have modified the check_required subroutine to include the following lines at the beginning (I did not use '_' as this could theoretically be a valid character in an address):

$Config{'recipient'} =~ tr/+?/@./;   # converts all zemployee1+domain?com to zemployee1@domain.com
$Config{'recipient'} =~ s/^.//;        # removes first character resulting in employee1@domain.com
$Config{'recipient'} =~ s/,z/,/g;      # if more than one email was submitted remove other 'z' prefixes

There might be a cleaner way to do this, but this works! Any suggestions to clean-up COBOLdinosaur? recipient is a comma delimited text string (as submitted from the form field).

Thanks,
Dan
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13413049
That looks efficient, and as you said it works. :^)

Cd&
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question