org_heigl / mailproxy
Display clickable eMail-Adresses without being spamed
Requires
- php: ^7.0
- zendframework/zend-modulemanager: ^2.7
- zendframework/zend-mvc: ^3.0
- zendframework/zend-uri: ^2.5
- zendframework/zend-view: ^2.8
Requires (Dev)
- mockery/mockery: ^0.9.8
- phpunit/phpunit: ^6.0
- dev-master
- 2.0.0
- 1.0.0
- dev-dependabot/composer/mockery/mockery-1.3.6
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/mockery/mockery-1.3.4
- dev-dependabot/composer/zendframework/zend-mvc-3.1.1
- dev-dependabot/composer/zendframework/zend-http-2.11.2
- dev-dependabot/composer/zendframework/zend-view-2.11.4
- dev-dependabot/composer/zendframework/zend-modulemanager-2.8.4
- dev-dependabot/composer/zendframework/zend-uri-2.7.1
- dev-dependabot/composer/phpunit/phpunit-6.5.14
- dev-phpug
This package is auto-updated.
Last update: 2024-11-08 08:59:05 UTC
README
Org_Heigl\Mailproxy
This Zend-Framework-module allows creation of mailto-links using obfuscated eMail-addresses.
The provided eMail-Address will be obfuscated by simply reversing it. Using CSS the eMail-address will be perfectly readable in the default HTML-output but robots greping the site will simply see a 'reversed' eMail-address or some garbage.
By clicking on the link the reversed eMail-address will be send to a proxy that redirects the browser to a mailto-url containing the correct eMail-address.
Installation
The module is best installed using composer.
composer require org_heigl/mailproxy
Usage:
-
In your application.conf-file add the Module to the list of modules like this:
return [ 'modules' => [ … 'Org_Heigl\Mailproxy'. … ] ];
-
In your view-script you can then add the following code snippet to create a mailto-link to the address info@example.com:
<?php echo $this->mailto('info@example.com', 'Send me an Email', ['class' => 'myClass', 'title' => 'click me']);
The second parameter is optional and its content will be set as link-name (The stuff between the and ) If it's ommited the email-address will be given in a way that it's hard for bots to retrieve them in cleartext.
The third parameter is also optional. It can be an associative array with further attributes for the anchor-tag. If you want to set the third parameter but omit the second, pass ``null``` as second parameter.
Experiences
This module runs on php.ug for by now 4 years and I didn't get any spam to the email-addresses that are displayed by the module.