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

sendpalm

v1.0.10

Published

SendPalm Email Api

Downloads

24

Readme

SendPalm Email Api

Installation

npm install sendpalm

Usage

  1. Register an account at https://sendpalm.com/, and then get your auth token on the https://sendpalm.com/api page

  2. Use in file:

    //ES6
    import Email from 'sendpalm'
    //CommonJS
    //const Email = require('sendpalm')
       
    const email = new Email("your token")
       
    // Email Verify
    async function verify() {
      const result = await email.verify("email address")
      console.log(result)
    }
    // Send transactional emails
    async function send() {
      const result = await email.send(fromEmail, toEmail, subject, content, templateParams)
      console.log(result)
    }
    // Campaign sending
    async function sendCampaign() {
        const result = await email.sendCampaign(fromEmail, toEmail, subject, campaignId, templateParams)
        console.log(result)
    }
    // Email verify with params
    async function verifyWithParams(){
      const params = {
        fromEmail: "fromEmail",
        listId: "listId",
        phone: "phone",
        toEmail: "toEmail",
      };
      const result = await email.verifyWithParams(params);
      console.log(result)
    }
    // Send transactional emails with params
    async function sendWithParams() {
      const params = {
        fromEmail: "fromEmail",
        toEmail: "toEmail",
        subject: "Welcome use SendPalm Email API",
        content: "Hi All,Welcome use SendPalm Email API",
        templateParams: {"campany":"SendPalm Inc."},
        delay: 20,//minutes
      };
      const result = await email.sendWithParams(params);
      console.log(result);
    }
    // Campaign sending with params
    async function sendCampaignWithParams() {
      const params = {
        fromEmail: "fromEmail",
        toEmail: "toEmail",
        subject: "Welcome use SendPalm Email API",
        campaignId: "1234",
        templateParams: {"campany":"SendPalm Inc."},
        delay: 20,
      };
      const result = await email.sendCampaignWithParams(params);
      console.log(result);
    }
    // New Audience with params
    async function newAudienceWithParams() {
      const params = {
         email: "email",
         fullname: "test",
         listId: "listId",
         phone: "1212121212"
       }
       const result = await email.newAudienceWithParams(params);
       console.log(result);
    }
    // Verify email with your webhook
    async function verifyWithWebhook() {
      const params = {
         fromEmail: "fromEmail",
         listId: "listId",
         phone: "phone",
         toEmail: "toEmail",
         webhook_url: "your url",
       }
       const result = await email.verifyWithWebhook(params);
       console.log(result);
    }
    // Find mail with Domain
    async function findWithDomain() {
      const params = {
         domain:"domain.com",
       }
       const result = await email.findWithDomain(params);
       console.log(result);
    }
    // Find mail with name
    async function findWithName() {
      const params = {
         first_name: "first_name",
         last_name: "last_name",
         domain: "domain.com",
       }
       const result = await email.findWithName(params);
       console.log(result);
    }

Verification

Response

For example, the verification email is [email protected]:

[
  {
    "input": "[email protected]",
    "is_reachable": "safe",
    "misc": {
      "is_disposable": false,
      "is_role_account": true
    },
    "mx": {
      "accepts_mail": true,
      "records": [
        "m1.feishu.cn."
      ]
    },
    "smtp": {
      "can_connect_smtp": true,
      "has_full_inbox": false,
      "is_catch_all": false,
      "is_deliverable": true,
      "is_disabled": false
    },
    "syntax": {
      "address": "[email protected]",
      "domain": "sendpalm.com",
      "is_valid_syntax": true,
      "username": "service"
    }
  }
]

is_reachable field = Email deliverability

For each email, SendPalm gives a confidence score in terms of deliverability in the is_reachable field. This field can take 4 values:

  • safe: We guarantee a hard bounce rate lower than 2%. Bounce rates may still happen, because we connect to the email's SMTP server from a different IP address than you, and yours might be blacklisted.
  • invalid: We guarantee with a confidence of 99% that this email is not deliverable.
  • risky: The email address appears to exist, but has quality issues that may result in low engagement or a bounce. We don't recommend sending to these emails, and don't commit on an accuracy rate.
  • unknown: It might happen on rare occasions that the email provider doesn't allow real-time verification of emails. In this case, there's unfortunately nothing Reacher can do. Please let us know if this happens, we're working on finding ways to solve these issues, which in most occasions are solved on a case-by-case basis.

Detailed deliverability in other fields

If the 4 variants of the is_reachable field is not enough for your use case, then you can look into the other fields, which provide more details about the email address.

When you input an email address, Reacher starts analyzing the email in 4 areas.

  1. ✏️ Syntax Checks: Syntax checks ensure that the email meets certain basic criteria such as whether it contains the "@" symbol within the email address.
  2. 🌐 Domain Name Checks: Domain checking ensures that the email address contains a valid internet domain name, and validates if the featured domain is configured to accept mail.
  3. ⚙️ SMTP Checks: This function checks that the address segment before the ‘@’ sign is a valid mailbox. This is the clever part, and what sets our service apart from many others.
  4. 💡 Misc Checks: This function checks some miscelleanous information about the email address. As of today, it only checks if the email address is disposable, but we're looking to add checks around whether the email provider is free or not, if it's an role-based email address, or if it has been compromised in data breaches.