Added emailpreview.php and function to support it in emailclass.php.

David, I also put the uploaded file location in the siteConfig table and
updated config/general.php