Quantcast
Channel: Gmail API - Parse message content (Base64 decoding?) with Javascript - Stack Overflow
Browsing latest articles
Browse All 5 View Live

Answer by standup75 for Gmail API - Parse message content (Base64 decoding?)...

You need to search where the body for a given mime type is, I have written a recursive function for that:function searchBodyRec(payload, mimeType){ if (payload.body && payload.body.size...

View Article



Answer by FullStack for Gmail API - Parse message content (Base64 decoding?)...

Regarding the Base64 decoding, you can use atob(dataToDecode)For Gmail, you'll also want to replace some characters:atob( dataToDecode.replace(/-/g, '+').replace(/_/g, '/') ); The above function is...

View Article

Answer by artis3n for Gmail API - Parse message content (Base64 decoding?)...

Ah! I figured it out. parts is an array, so I should have been calling it like: gapi.client.gmail.users.messages.get({'id': <message ID>}).payload.parts[0].body.dataNow my problem is decoding the...

View Article

Answer by Eric D for Gmail API - Parse message content (Base64 decoding?)...

Depending on what your emails look like (single text/plain part? multipart with text/html? attachments, etc?) you may or may not have any "parts" in your email.payload and instead you'll have what...

View Article

Gmail API - Parse message content (Base64 decoding?) with Javascript

I'm trying to use the Gmail API to get a user's email, grab the message subject and body, and then display it on a webpage. I'll be doing other stuff with it, but this is the part that I am having...

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images