EmailProvidersNetcore

Netcore

Send emails using the Netcore (Pepipost) Email API with @visulima/email

Netcore Provider

The Netcore provider sends emails through the Netcore Email API v5.1 (formerly Pepipost).

Runtime Support: Universal (Node.js, Deno, Bun, Cloudflare Workers) — uses the Fetch API.

Setup

import { createMail } from "@visulima/email";
import { netcoreProvider } from "@visulima/email/providers/netcore";

const mail = createMail(
    netcoreProvider({
        apiKey: process.env.NETCORE_API_KEY!,
    }),
);

Configuration

The NetcoreConfig interface extends BaseConfig with the following options:

OptionTypeRequiredDefaultDescription
apiKeystringYes-Your Netcore Email API key (sent as api_key header)
endpointstringNohttps://emailapi.netcorecloud.net/v5.1Custom API endpoint
debugbooleanNofalseEnable debug logging
loggerConsoleNo-Custom logger instance
retriesnumberNo3Number of retry attempts
timeoutnumberNo30000Request timeout in milliseconds

Basic Usage

const result = await mail.send({
    from: { email: "noreply@example.com", name: "My App" },
    to: { email: "user@example.com" },
    subject: "Hello from Netcore",
    html: "<h1>Welcome!</h1>",
    text: "Welcome!",
});

Provider-Specific Email Options

The NetcoreEmailOptions interface extends EmailOptions with:

OptionTypeDescription
templateIdstringStored template id to send instead of inline content
templateDataRecord<string, unknown>Variables substituted into the Netcore template
await mail.send({
    from: { email: "noreply@example.com" },
    to: { email: "user@example.com" },
    subject: "Templated email",
    templateId: "12345",
    templateData: { name: "Ada" },
});

Supported Features

  • ✅ Attachments
  • ✅ Batch sending
  • ✅ Custom headers
  • ✅ HTML & text bodies
  • ✅ Reply-To
  • ✅ Tagging
  • ✅ Templates
  • ✅ Tracking
Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues