Documentation

🐺 Senderwolf Documentation

Everything you need to know about using senderwolf for secure, fast email delivery

Overview

Senderwolf is a developer-friendly email-sending tool built for Node.js environments. It can be used:

Programmatically as a library

Import and use in your Node.js applications

As a command-line utility

Use via npx senderwolf

It supports:

  • Sending emails through any SMTP provider (Gmail, Outlook, etc.)
  • Plain text or HTML content
  • Attachments (PDFs, images, etc.)
  • Interactive CLI prompts
  • Dry-run mode (preview email without sending)

Installation

Use via npx (No install required)

npx senderwolf

Or install as a project dependency

npm install senderwolf

CLI Usage

Interactive Mode (Prompt-based)

You'll be prompted to enter recipient email, subject, message body, SMTP credentials, and optional file attachment.

npx senderwolf

Dry-Run Mode

Shows a preview of the email instead of sending it.

npx senderwolf --dry-run

CLI Options

FlagDescription
--toRecipient email address
--subjectSubject line for the email
--textPlain text content
--htmlHTML content (as inline string or path)
--attachPath to a file to attach
--smtp-hostSMTP server host
--smtp-portSMTP port (typically 465 or 587)
--userSMTP username (email address)
--passSMTP password or app password
--dry-runPreview the email without sending

📝 Short-form flags like -t or -s are not yet supported.

Programmatic Usage

import { sendEmail } from 'senderwolf';

await sendEmail({
  to: 'hello@example.com',
  subject: 'Test Email',
  html: '<h1>Hello from Senderwolf</h1>',
  attachments: ['./report.pdf'],
  smtp: {
    host: 'smtp.gmail.com',
    port: 465,
    user: 'your@email.com',
    pass: 'your_app_password',
  },
});

Security Guidelines

Use App Passwords for Gmail accounts with 2FA.
Avoid committing credentials to source control.
Store credentials securely (e.g., using environment variables).

Features

Completed

SMTP email sending

Send emails through any SMTP provider

Completed

HTML and plain text support

Rich content and simple text emails

Completed

File attachments

Attach PDFs, images, and other files

Completed

Interactive CLI prompt

User-friendly command line interface

Completed

Dry-run preview mode

Preview emails before sending

Roadmap

📋 Planned

Short-form flags (-t, -s, etc.)

Convenient abbreviated CLI options

📋 Planned

Config file support (.senderwolfrc)

Project-based configuration files

🚧 Progress

Email templating support

Template engines for dynamic content

📋 Planned

Retry & fallback mechanisms

Robust error handling and recovery

Contribute

Found a bug or want to request a feature?

Open an issue or PR at 👉 GitHub Repository