Skip to content

Simple library to parse SendGrid Inbound Mail

License

Notifications You must be signed in to change notification settings

feryardiant/sendgrid-inbound-parser

Repository files navigation

Sendgrid Inbound Parser

My personal implementation of SendGrid inbound-mail parser.

Usage

This package exposes 4 functions

async parseEmail(req): Promise<NormalizedEmail>

Parse email field in inbound mail body.

async storeAttachment(attachment, bucket): Promise<File>

Store the attachment file to google storage bucket.

normalize(email): NormalizedEmail

Normalize parsed-mail from 'mailparser' package

inboundParser()

Express middleware to parse request body.


Please refer to this file for more type definitions

Credits

Licenses

code is licensed under MIT,