javascriptemailgoogle-chrome-extensiongmail-apirfc2822

Manipulate RFC 2822 email in javascript


I am creating a chrome extension which works with the gmail api. The email format followed is based on RFC 2822. I want to modify the email. Is there any standard library in javascript to manipulate the RFC 2822 compliant email?


Solution

  • I really like Mailparser by andris9. It is made for Node, but you can browserify it or get inspiration from the source.

    When you have parsed it, you can manipulate it with his other library, Mailcomposer.