Using a string from a custom field within a link

Change,

<?php $email ?>

to…

<?php echo $email; ?>

as you need to echo the result of what’s held within $email as the function types_render_field would be using return within the function (if you dig into its core) to return the data instead of directly printing it to screen.

<?php $email = types_render_field ("email");
          if ( $email ) { ?>
           <a href="https://wordpress.stackexchange.com/questions/69227/mailto:<?php echo $email; ?>"><img src="<?php bloginfo( 'template_url' ); ?>/images/icon-email.gif" width="24" height="24" /></a>
<?php } ?>