https://github.com/feryardiant/sendgrid-inbound-parser
Simple library to parse SendGrid Inbound Mail
https://github.com/feryardiant/sendgrid-inbound-parser
inbound-email sendgrid sendgrid-inbound-webhook-parser
Last synced: about 1 year ago
JSON representation
Simple library to parse SendGrid Inbound Mail
- Host: GitHub
- URL: https://github.com/feryardiant/sendgrid-inbound-parser
- Owner: feryardiant
- License: mit
- Created: 2024-04-16T21:38:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T06:03:44.000Z (about 1 year ago)
- Last Synced: 2025-04-04T12:04:18.113Z (about 1 year ago)
- Topics: inbound-email, sendgrid, sendgrid-inbound-webhook-parser
- Language: TypeScript
- Homepage:
- Size: 4.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Sendgrid Inbound Parser
My personal implementation of SendGrid inbound-mail parser.
## Usage
This package exposes 4 functions
### `async parseEmail(req): Promise`
Parse email field in inbound mail body.
### `async storeAttachment(attachment, bucket): Promise`
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](dist/index.d.ts) for more type definitions
## Credits
- Official inbound-mail parser [@sendgrid/inbound-mail-parser](https://www.npmjs.com/package/@sendgrid/inbound-mail-parser)
## Licenses
code is licensed under [MIT](./LICENSE),