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

@prymejo/nestjs-sms-and-email-module

v1.0.32

Published

<p align="center"> <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a> </p>

Downloads

79

Readme

Description

@prymejo/nestjs-sms-and-email-module is a simple package that provides functionalities for sending emails and sms.

The package works with Nodejs v18 >

Key features

  1. Send bulk sms
  2. Send single sms
  3. Send Email with text
  4. Send email with template ( templates can be generated on mandrill or mailchimp)

About

This is a simple implementation for sending email and sms notifications with nestjs . It uses Mailchimp( Mandrill https://mailchimp.com ) for sending emails and Termii (https://termii.com/) for sending sms.

Sample payload for sending sms

//you will need to set the senderId from the

input: {
from:"[email protected]" 
to:"+2348007910016"
sms:"test message"
channel:GENERIC
type:"plain"
}

Sample payload for sending email

//you will need to set the from_mail on the mandrill dashboard

input: {
message: {
to: [{ email: "[email protected]" }]
text: "testing email"
from_email: "[email protected]"
subject:"testing emails"
}
}

Initializing the sms module

import {SmsModule} from '@prymejo/nestjs-sms-and-email-module';

@module({
imports:[SmsModule.register(TERMII_API_KEY)]
})

Using the sms service

import {SmsService} from '@prymejo/nestjs-sms-and-email-module';

export class UserService{
constructor(private readonly smsService:SmsService){
}

async sendOtp(payload:SendSmsInterface){
await this.smsService.sendSms(payload)
}

Initializing the Email module

import {EmailModule} from '@prymejo/nestjs-sms-and-email-module';

@module({
imports:[EmailModule.register(MANDRILL_API_KEY)]
})

Using the email service

import {EmailService} from '@prymejo/nestjs-sms-and-email-module';

export class UserService{
constructor(private readonly emailService:EmailService){}
async sendEmail(payload:MailChimpEmailInterface){
await this.emailService.sendMail(payload)
}

PS: Contributions are welcome.

Note : you will need to create accounts on both Mandrill ((https://mailchimp.com) docs can be found at https://mailchimp.com/developer/transactional/api/ ) and Termii((https://termii.com/) docs can be found at https://developer.termii.com/switch) to obtain their api keys.

Installation

npm  install  @prymejo/nestjs-sms-and-email-module

yarn  add  @prymejo/nestjs-sms-and-email-module

License

Nest is MIT licensed.