fixed emailing capability, to use base64 form for upload