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

dashamail

v2.0.1

Published

Software Development Kit for DashaMail

Downloads

22

Readme

version npm Donate npm Snyk Vulnerabilities for npm package Donate Donate

DashaMail

Software Development Kit for DashaMail

Install

npm

npm i --save dashamail

yarn

yarn add dashamail

Use

DashaMail Transactional Send

const {transactional: Transactional} = require('dashamail');

new Transactional()
    .setApiKey('API_KEY')
    .setTo('USER_EMAIl', 'USER_NAME')
    .setFrom('FROM_EMAIL', 'FROM_NAME')
    .setReplyTo('RESPONSE_TO_EMAIL', 'RESPONSE_TO_NAME')
    .setSubject('Test') // subject (title) of the letter
    .setMessage(0) // messageId from dashamail (can get it while edit template from url)
    .setReplaces({'KEY': 'VALUE', 'KEY2': 1}) // substitutions in the letter template
    //.setDomain('somedomain.zone') // the sending domain to be used for DKIM/SPF signatures. Default, first in list "Account -> My Domains"
    //.setCampaignId(0) // campaignId used for filter sended emails by some id 
    //.setDeliveryTime(+new Date() + (1000 * 60 * 5)) // send email after 5 min 
    //.setPlainText('YOUR_PLAIN_TEXT')
    //.setNoTrackClicks(true) // do not track email links clicks, default false
    //.setNoTrackOpens(true) // do not track email opens, default false
    .send() // sending request to dashamail api
    .then(
        transactionId => {/* Do something with transaction id */},
        errorString => {/* Do something with errorString */}
    );

DashaMail Transactional Check

const {transactional: Transactional} = require('dashamail');

new Transactional().setApiKey('API_KEY').check('TransactionalID') // put here correct id
    .then(
        response => {/* Do something with response */},
        errorString => {/* Do something with errorString */}
    );

DashaMail Transactional Events List

const {transactional: Transactional} = require('dashamail');
const EventType = require('dashamail/classes/eventType');
const Sort = require('dashamail/classes/sort');
const from = new Date(); from.setUTCHours(0,0,0,0);
const fromMonth = from.getMonth()+1 < 10 ? '0' + from.getMonth()+1 : from.getMonth()+1;
const to = new Date(); to.setUTCHours(23,59,59,999);
const toMonth = to.getMonth()+1 < 10 ? '0' + to.getMonth()+1 : to.getMonth()+1;

new Transactional()
    .setApiKey('API_KEY')
    .setLogEventType(EventType.ALL) // filter events by type. Default EventType.ALL
    .setLogSort(Sort.asc) // filter event time. Default Sort.desc
    // get event after date yyyy-mm-dd hh:mm:ss
    .setLogFrom(`${from.getFullYear()}-${fromMonth}-${from.getDate()} ${from.getHours()}:${from.getMinutes()}:${from.getSeconds()}`)
    // get event before date yyyy-mm-dd hh:mm:ss
    .setLogTo(`${to.getFullYear()}-${toMonth}-${to.getDate()} ${to.getHours()}:${to.getMinutes()}:${to.getSeconds()}`)
    .get_log() // sending request or row below (with params)
    //.get_log(0, 25) // with start from (default 0) & count items for response (by default 500)  
    .then(
        items => {/* Do something with items: object[] */},
        errorString => {/* Do something with errorString */}
    );

Author

Nikita Sereda

Contacts:

VK | Telegram