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 🙏

© 2025 – Pkg Stats / Ryan Hefner

strapi-plugin-email-bulk-sender

v0.1.0

Published

A Strapi plugin that allows sending bulk email campaigns using HTML templates.

Readme

Email Bulk Sender Plugin

A Strapi plugin that allows sending bulk email campaigns using HTML templates.

Description

Email Bulk Sender is a Strapi v5 plugin that provides functionality for mass sending personalized email messages. The plugin includes:

  • Administrative interface for selecting recipients and templates
  • Template system with variable support
  • Bulk sending with result tracking
  • Security with template path validation

Features

  • 📧 Bulk email sending with rate limiting
  • 🎨 HTML template support with variables
  • 👥 Recipient selection from various collections
  • 📊 Send result tracking
  • 🔒 Secure template file handling and authentication
  • 🎯 Message personalization
  • ✅ Email validation
  • ⚡ Configurable rate limiting

Installation

  1. Ensure the plugin is located in the src/plugins/strapi-plugin-email-bulk-sender/ folder
  2. The plugin is automatically loaded by Strapi on startup

Configuration

Plugin Configuration

Add configuration to the config/plugins.ts file:

export default {
  // ... other plugins
  'strapi-plugin-email-bulk-sender': {
    enabled: true,
    resolve: './src/plugins/strapi-plugin-email-bulk-sender'
  },
  // ... other settings
}

Email Service Configuration

Ensure that an email provider is configured in Strapi. Add configuration to config/plugins.ts:

export default {
  // ... other plugins
  email: {
    config: {
      provider: 'nodemailer', // or another provider
      providerOptions: {
        // provider settings
      },
      settings: {
        defaultFrom: '[email protected]',
        defaultReplyTo: '[email protected]',
      },
    },
  },
  // ... other settings
}

Template Path Configuration

By default, the plugin looks for templates in the templates/ folder in the project root. You can customize various settings:

export default {
  // ... other plugins
  'strapi-plugin-email-bulk-sender': {
    enabled: true,
    resolve: './src/plugins/strapi-plugin-email-bulk-sender',
    config: {
      emailTemplate: {
        enabled: true,
        path: 'templates', // path to templates folder
        rateLimitDelay: 2000 // delay between emails in milliseconds (default: 1000)
      }
    }
  },
  // ... other settings
}

Configuration Options

  • enabled: Enable/disable the email template functionality (default: true)
  • path: Path to the templates folder relative to project root (default: 'templates')
  • rateLimitDelay: Delay between email sends in milliseconds to prevent SMTP rate limiting (default: 1000)

Usage

Creating Templates

  1. Create HTML files in the templates/ folder
  2. Use variables in the format {{variableName}}
  3. Available variables:
    • {{email}} - recipient's email
    • {{name}} - recipient's name
    • Any additional fields from your document data (e.g., {{company}}, {{position}}, etc.)

Example template (templates/welcome.html):

<!DOCTYPE html>
<html>
<head>
    <title>Welcome</title>
</head>
<body>
    <h1>Hello {{name}}!</h1>
    <p>Your email: {{email}}</p>
    <p>Welcome to our platform!</p>
</body>
</html>

Sending via Administrative Interface

  1. Go to the Strapi admin panel
  2. Open the list of users in Content Manager
  3. Select recipients from available users using checkboxes
  4. The “Send email” button will appear. Click it.
  5. Choose a template for sending
  6. Click "Send emails"

API Endpoints

Get Templates List

GET /api/strapi-plugin-email-bulk-sender/templates

Get Template Content

GET /api/strapi-plugin-email-bulk-sender/templates/:templatePath

Send Bulk Emails

POST /api/strapi-plugin-email-bulk-sender/send-bulk-emails

Request body:

{
  "template": "welcome",
  "documents": [
    {
      "id": 1,
      "email": "[email protected]",
      "name": "John Doe"
    }
  ]
}

Security Features

The plugin includes several security measures:

  • Authentication Required: All email sending endpoints require admin authentication
  • Email Validation: All email addresses are validated before sending
  • Template Path Security: Template paths are validated to prevent directory traversal attacks
  • Rate Limiting: Configurable delays between emails to prevent SMTP abuse
  • Input Validation: Comprehensive validation of all input parameters

Project Structure

src/plugins/strapi-plugin-email-bulk-sender/
├── admin/                 # Administrative interface
│   ├── src/
│   │   ├── components/    # React components
│   │   ├── pages/         # Admin pages
│   │   └── utils/         # Utilities
├── server/                # Server-side
│   ├── src/
│   │   ├── controllers/   # API controllers
│   │   ├── routes/        # Routes
│   │   ├── services/      # Services
│   │   └── config/        # Configuration
├── package.json
└── README.md

Development

Building the Plugin

npm run build

Development Mode

npm run watch

TypeScript Check

npm run test:ts:front  # for admin
npm run test:ts:back   # for server

Requirements

  • Strapi v5.23.3
  • Node.js 18+
  • Configured email provider in Strapi

License

MIT License

Author

denisgrushkin [email protected]