base64 encode attachment content