Search code examples
google-chrome-extensiongmailgmail-api

How to save gmail as .eml file using gmail api and chrome extension?


I am new to gmail api and developing chrome extension which saves selected email as .eml or .msg file.I have successfully got the current/selected message id and also got the raw message data using gmail api. I want to know how I can convert the raw message data to .eml file using c# webservice ? (raw data will be sent to my webservice)

any help is appreciated.

Thanks, Anuj


Solution

  • got the answer after reading and analysing documentation of [gmail-api]. the message.raw part is RFC 2822 formatted and base64 url encoded string.

    so at server side we need to do reveres, decode the base64url encoded string and save the data in .eml file.

    Thanks, Anuj