preg_replace('/([email regexp])/i','<a href="mailto:\1">\1</a>, $text);
Replacing [email regexp] is the hairy bit - a full RFC822-compliant regexp can be scary to write, and usually has to be built up in stages with lots of $this="$that$theother" operations.
But
preg_replace('/([-a-z0-9]+(.[-a-z0-9])@[-a-z0-9]+(.[-a-z0-9]))/i','<a href="mailto:\1">\1</a>, $text);
can be considered a start.