mat-sz / letterparser

✉️ Isomorphic e-mail parser (with MIME support) written in TypeScript.
BSD 3-Clause Clear License
34 stars 4 forks source link

Can letterparser be used on the frontend? #6

Closed philippedasilva-orizone closed 3 years ago

philippedasilva-orizone commented 3 years ago

I'm looking for a solution that would enable email parsing on the client side. Is it possible with letterparser? Should I look elsewhere? Do you believe some additional work could enable it (which I would then be inclined to try to bring into the project)?

Thanks

mat-sz commented 3 years ago

@philippedasilva-orizone Hey!

Yes, letterparser allows for usage both in client and server side.

Here's an example of an app which uses letterparser and react-letter (there are examples utilizing letterparser in the README) to display e-mails in the client side.

Parsing: https://github.com/mat-sz/catchmail-web/blob/master/src/sagas/index.ts#L58 Preview: https://github.com/mat-sz/catchmail-web/blob/master/src/components/EmailPreview.tsx

There is also a Vue.js component available.

philippedasilva-orizone commented 3 years ago

Thanks for the information @mat-sz I'll make sure to contribute if I find anything that I need I believe would make a good addition or bugs eventually ;)