New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

dakiya

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dakiya

![CI](https://github.com/arn4v/dakiya/actions/workflows/ci.yml/badge.svg)

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

Dakiya

CI

Simple email automation for Node.js made easy.

Features

  • Zero config management: Use simple, chainable code to create email sequences.
  • Email platform agnostic: Only SMTP credentials required.

Roadmap

  • Compliance Features (Unsubscribing)
  • Custom conditionals support
  • Tracking Opens
  • Self-hostable web interface

Example Ussage

import { Sequence, Scheduler } from "dakiya";
import { z } from "zod";

const welcomeVariablesSchema = z.object({
  name: z.string(),
  verificationUrl: z.string(),
});

enum EmailSequence {
  Onboarding = "onboarding",
}

export const onboarding = new Sequence(
  EmailSequence.Onboarding,
  welcomeVariablesSchema
)
  .waitFor("5m")
  .sendMail({
    subject: "Welcome to {Product Name}!",
    html({ name }) {
      return `Hi ${name}, Welcome to {Product Name}`; // Email HTML
    },
  })
  .sendMail({
    subject: "Verify Your Email",
    html({ verificationUrl }) {
      return "";
    },
  })
  .waitFor("1d")
  .sendMail({
    subject: "Access {Product Name} On The Go!",
    html({ name }) {
      const downloadUrl = "";
      return `Hi ${name}, Access {Product Name} on the go using our mobile app. Download for iOS: ${downloadUrl}`
    }
  });

export const scheduler = new Scheduler([onboarding], {
  mongoUri: "", // mongodb connections string
  transportOpts: {}, // nodemailer transport options
  waitMode: "stack"
});

await scheduler.initialize();
await scheduler.schedule(
  EmailSequence.Onboarding,
  { name: "", verificationUrl: "" },
  // Nodemailer SendMailOptions
  {
    to: "",
    from: "",
  }
);

FAQs

Package last updated on 06 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts