MIME64的base64解码不起作用(GMail API) [英] Base64 decoding of MIME email not working (GMail API)

查看:486
本文介绍了MIME64的base64解码不起作用(GMail API)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GMail API来检索电子邮件内容。我正在获得身体的以下base64编码数据: http://hastebin.com/ovucoranam.md



但是当我通过base64解码器运行它时,它会返回一个空字符串(错误)或类似于HTML数据的东西,但是有一堆奇怪的字符。 / p>

帮助?

解决方案

我不知道你是否解决了它,但GmailGuy是正确的。您需要将身体转换为Base64 RFC 4648标准。你需要使用 + _ - $ c> with /



我已经收到您的原始输入并进行了替换: http://hastebin.com/ukanavudaz



并使用base64decode.org解码它,这很好。


I'm using the GMail API to retrieve an email contents. I am getting the following base64 encoded data for the body: http://hastebin.com/ovucoranam.md

But when I run it through a base64 decoder, it either returns an empty string (error) or something that resembles the HTML data but with a bunch of weird characters.

Help?

解决方案

I'm not sure if you've solved it yet, but GmailGuy is correct. You need to convert the body to the Base64 RFC 4648 standard. The jist is you'll need to replace - with + and _ with /.

I've taken your original input and did the replacement: http://hastebin.com/ukanavudaz

And used base64decode.org to decode it, and it was fine.

这篇关于MIME64的base64解码不起作用(GMail API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆