email

Posted by: 
Dominique De Cooman

Here is an example on how to obscure email addresse (or other tekst) using http://drupal.org/project/signwriter in a formatter. You can use it on the cck field overview as a formatter (or in display suite).

<?php
//cck formatters
/**
 * Implementation of hook_field_formatter_info(),.
 */
function your_module_field_formatter_info() {
  return array(
    
'text_as_image' => array(?>

Obscure email addresses in drupal using signwriter

Signwriter is a Drupal module that allows you to use TrueType fonts to replace text in headings, menu's etc.
It does this by replacing text with an image from the TrueType font file. This enables you to obscure email addresses, by replacing them with an image.

http://www.commonplaces.com/resources/blog/using-signwriter-obscure-emai...

Posted by: 
Dominique De Cooman

Apparently when your line length exceeds 998 characters an exclamtion mark is placed in your mail. This is exactly what happend to us when we tried sending a hmtl newsletter using simple news and mime mail module.
When using thunderbird you can see the source of your email. (with other clients probably too) You ll see the html part of the multipart mail is one line. Which offcourse exceeds the line length. Resulting in many Exclamation marks in your mail.
The Solution:
You ll have to chunk up your email before it reaches the mail() function.

Posted by: 
Dominique De Cooman

This module turns dominique@dominiquedecooman.com into

<a href="mailto:&#100&#111&#109&#105&#110&#105&#113&#117&#101&#64&#100&#111&#109&#105&#110&#105&#113&#117&#101&#100&#101&#99&#111&#111&#109&#97&#110&#46&#99&#111&#109">

in the html code. Preventing your email being harvested by spammers.

The code in the module can be found on http://drupal.org/node/151638
I just put it in a little module ready to be downloaded and installed.

Subscribe to email