npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@scrrum-labs/sendgrid-inbound-parser

v1.0.10

Published

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 administrator. 2. Create a new MX record for the subdomain (e.g. parse.yourdomain.com) you want to pr

Downloads

5

Readme

sendgrid-inbound-parser

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 administrator.
  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. It should look something like this:
10 mx.sendgrid.net.
  1. From your SendGrid Dashboard click Settings, and then click Inbound Parse. You are now on the Inbound Parse page.
  2. Click Add Host & URL. (The URL must be accessible from the public web.)
  3. 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.
  4. Click Save.

Installation

$ npm install --save @scrrum-labs/sendgrid-inbound-parser

Usage

At your hosted url

const sg = require("@scrrum-labs/sendgrid-inbound-parser");

export const storeEmail = functions.https.onRequest(async (request) => {
              const subject = sg.getSubject(request.body)
              const body = sg.getBody(request.body)
              const attachment = sg.getAttachment(request.body)
              });

Methods

getBody(data){} // It will return whole body: String, 
example: "Test Body" 
getTo(data){} // It will return email ID & name of receiver: Array of object, 
example: [{email:"[email protected]", name:"scrrum"}]
getFrom(data){} // It will return email ID & name of sender: Array of object, 
example: [{email:"[email protected]", name:"scrrum"}]
getSubject(data){} // It will return subject of incomming email: String, 
example: "Test Subject" 
getSenderIP(data){} // It will return IP address of incomming email: String, 
example: "90.92.80.92.02" 
getAttachmentsNumber(data){} // It will return number of attachments: Number, 
example: 2
getAttachmentInfo(data){} // It will return info of attachments: JavaScript object, 
Example: 
{
  "attachment1": {
    "filename": "46568986193797146.csv",
    "name": "46568986193797146.csv",
    "charset": "UTF-8",
    "type": "text/csv",
    "content-id": "f_lhj3sxzx1"
  },
  "attachment2": {
    "filename": "react.png",
    "name": "react.png",
    "type": "image/png",
    "content-id": "f_lhj3sxzq0"
  }
} 
getAttachment(data){} // It will return attachments: Array of object, 
example: [{content:"",contentType:""}] 
getHtmlBody(data){} // It will return whole html body : String, 
example: "<html><body>Test Body</body></html>"