I'm working on an email application using VueJs / Quasar on the client and HapiJS on the server, and some emails (depending on the sender) come with base64-encoded text, and some do not.
To solve this, I need to find a way to identify if the email body is in base64 and only after identifying it to send it decoded to the client, and if it is not encrypted, just send it to the client