Computing Science and Mathematics

Hiding Your Email Address

To attempt to protect our departmental email addresses from spammers, it is possible to remove email addresses and "mailto:" tags from departmental web pages and hide them from robots behind a CGI script.

For example: ; ;

are 3 buttons which, when clicked, reveal the user's or mailing list's email address via a CGI script.

If not using the department's CSS, these buttons would look like this:

The HTML code that you need to produce a single button on your web pages is:


    <form action="/cgi-bin/get-email" method="post">
    <input name="user" class="deptbutton"
           value="SEARCH STRING" type="submit" />
    </form>
    

where "SEARCH STRING" would be replaced in the above 3 examples by:
  "Graham Cochrane", "Head of Department" and "Computing Science Advisers".

Alternatively, it is possible to setup a button such as , where the "SEARCH STRING" is hidden, allowing you to have any text you wish in the button - in this example "Email Me". This would be achieved with:


    <form action="/cgi-bin/get-email" method="post">
    <input type="hidden" name="user" value="SEARCH STRING" />
    <input class="deptbutton" value="Email Me" type="submit" />
    </form>
    

When a button is clicked, the CGI script performs a lookup based on the search string and returns a page with the email address and, if relevant, an associated web page address.

The default search string for each departmental user is the text that appears in the relevant button in the "Reveal Email" column on the departmental staff list page. However, it is possible to set up any appropriate search text to reveal any appropriate email address. The search text is case insensitive.

Please contact if you wish to have a new search string and/or associated email address set up, or if you need assistance modifying your web pages.

To test that a particular search string functions correctly, enter it (without quotes) in the text box below and click "Reveal".

Search String: 

Additional Features

Due to user requests, the following extra feature is available:

The additional hidden subject value can be set up to pass the subject line to the generated "mailto:" and web page, such as this button with the text "The subject text" in this example. This would be achieved with:


    <form action="/cgi-bin/get-email" method="post">
    <input type="hidden" name="user" value="SEARCH STRING" />
    <input type="hidden" name="subject" value="The subject text" />
    <input class="deptbutton" value="Email Me" type="submit" />
    </form>
    

Connect with Computing Science and Mathematics

Division of
Computing Science and Mathematics


Computing Science and Mathematics

Faculty of Natural Sciences
University of Stirling
Stirling FK9 4LA
Scotland UK

+44 01786 467421
csm-office@cs.stir.ac.uk

X: @csmstir
Facebook: StirUniCSM