A valuable tool for handling and processing of incoming emails through SendGrid's Inbound Parse..

What this package does?

The @scrrum-labs/sendgrid-inbound-parser npm package simplifies the process of handling incoming emails through SendGrid's Inbound Parse feature. It provides a set of methods to extract specific information from the parsed email data, allowing developers to effortlessly integrate and process incoming emails within their applications.

  • Staff qualifications (e.g. degrees, certifications)

  • The project was developed for a valued client in the United Kingdom.
  • A bespoke solution was created that includes both a front-facing website and a customized ERP solution.
  • The website showcases the extensive catalog of parts offered by UK Parts.
  • Customers can easily register on the website and send enquiries.
  • The ERP solution enables efficient management of business operations.
  • The ERP solution includes features such as receiving and responding to enquiries, sending quotations, creating orders and invoices, and tracking payments.
  • The ERP also provides comprehensive supplier and purchase order management.
  • This helps streamline procurement processes for UK Parts.

Configuration

1. Navigate to the MX Records page on your hosting provider’s website. If you’re unsure who your hosting or DNS provider is, please contact your website admini.

2. Create a new MX record for the subdomain (e.g. parse.yourdomain.com) you want to process incoming email.

3. Assign the MX record a priority of 10, and point it to the address: mx.sendgrid.net.

4. From your SendGrid Dashboard click Settings, and then click Inbound Parse. You are now on the Inbound Parse page

5. Click Add Host & URL. (The URL must be accessible from the public web.)

6. Enter the subdomain (for example, "parse") and select the authenticated root domain for your receiving domain. Enter the public URL where you would like the parsed data to be POSTed.

7. Click Save.

Sendgrid Inbound Parser

How to use?

The npm i @scrrum-labs/sendgrid-inbound-parser npm package is designed to simplify working with transactional and marketing email. Follow these steps to integrate and use the package in your Node.js application.

$ npm i @scrrum-labs/sendgrid-inbound-parser

Get Body

sg.getBody(request.body);
// Returns "Test Body"

Get To

sg.getTo(request.body);
// Returns email: "[email protected]", name: "scrrum"

Get From

Acquire an array of objects containing email ID and name of the sender.

sg.getFrom(request.body);
"// Returns email: "[email protected]", name: "scrrum" "

Get Subject

Retrieve the subject of the incoming email as a string.

sg.getSubject(request.body);
// Returns "Test Subject"

Get Sender IP

Obtain the IP address of the incoming email as a string.

sg.getSenderIP(request.body);
// Returns "90.92.80.92.02"

Get Attachments Number

Retrieve the number of attachments in the incoming email as a number.

sg.getAttachmentsNumber(request.body);
// Returns 2

Get Attachment Info

Obtain an object containing information about attachments.

sg.getAttachmentInfo(request.body);
// Returns content: "", contentType: ""

Get HTML Body

Obtain the entire HTML body of the incoming email as a string.

sg.getHtmlBody(request.body);
Blogs

Latest blogs