0

I'm using https://github.com/google/google-api-nodejs-client to get a list of threads/messages from my gmail account

I've got a multipart/related as the payload (body) of my email, how can I transform it to html or pdf?

Is there a better easy to get the content of gmail ?

I got the message like this:

const full  = await gmail.users.threads.get({ userId, id: firstThread.id, format: 'full' });
Sibelius Seraphini
  • 5,303
  • 9
  • 34
  • 55
  • Can I ask you about the detail of ``I've got a multipart/related as the payload of my email, how can I transform it to html or pdf?``? Do you want to retrieve the body of gmail or the attachment files of gmail? – Tanaike May 08 '18 at 21:53
  • I would like to receive the body of gmail – Sibelius Seraphini May 09 '18 at 16:55
  • If the mail has HTML body, you can retrieve it as HTML. If the mail has only the text body, it is required to convert it to the mimeType you want at the client side. – Tanaike May 09 '18 at 22:52

0 Answers0