Added base64 encoding of attachment file.