it didn’t work for me either, but if you look closely at the code you will find a small error:
$modx->documentOutput=preg_replace_callback("#<a[^>]*mailto:([^’\" ]*)[’\" ]>([^<]*)</a>#i", emailaddress, $modx->documentOutput);
should be:
$modx->documentOutput=preg_replace_callback("#<a[^>]*mailto:([^’\" ]*)[’\" ]>([^<]*)</a>#i", ’emailaddress’, $modx->documentOutput);
(quatations around emailaddress as you are calling a function)
found this error while reading the explanation of preg_replace_callback:
http://be2.php.net/preg_replace_callback
hope this helps some of you.