Index: email.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/email/email.module,v
retrieving revision 1.9.2.8.4.9
diff -u -p -r1.9.2.8.4.9 email.module
--- email.module	8 May 2009 14:07:54 -0000	1.9.2.8.4.9
+++ email.module	19 May 2009 13:04:50 -0000
@@ -17,6 +17,9 @@ function email_theme() {
     'email_formatter_spamspan' => array(
       'arguments' => array('element' => NULL),
     ),
+    'email_formatter_emailobfuscator' => array(
+      'arguments' => array('element' => NULL),
+    ),
     'email_formatter_contact' => array(
       'arguments' => array('element' => NULL),
     ),
@@ -109,6 +112,15 @@ function email_field_formatter_info() {
       ),
     );
   }
+  if (module_exists('emailobfuscator')) {
+    $formats += array(
+      'emailobfuscator' => array(
+        'label' => t('Email eMail obfuscator'),
+        'field types' => array('email'),
+        'multiple values' => CONTENT_HANDLE_CORE,
+      ),
+    );
+  }
   return $formats;
 }
 
@@ -135,6 +147,21 @@ function theme_email_formatter_spamspan(
 }
 
 /**
+ * Theme function for 'emailobfuscator' email field formatter.
+ */
+function theme_email_formatter_emailobfuscator($element) {
+  if (empty($element['#item']['safe'])) {
+    return '';
+  }
+  if (module_exists('emailobfuscator')) {
+    return _emailobfuscator_encode($element['#item']['email']);
+  }
+  else {
+    return '<a href="mailto:'. $element['#item']['email'] .'">'. $element['#item']['safe'] .'</a>';
+  }
+}
+
+/**
  * Theme function for 'contact' email field formatter.
  */
 function theme_email_formatter_contact($element) {
