1.0.3 • Published 7 months ago

@jubayer_shuvo/mailer-js v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

📬 @jubayer_shuvo/mailer-js

NPM version License: MIT Node.js Build GitHub stars

A lightweight and easy-to-use Node.js mailer utility supporting TypeScript and JavaScript.


✨ Features

  • 🚀 Simple and minimal API
  • 📦 Works with both CommonJS and ESModules
  • 📜 Written in TypeScript
  • 💌 Send emails with just one function

📦 Installation

npm install @jubayer_shuvo/mailer-js
# or
yarn add @jubayer_shuvo/mailer-js

Get Api for free

Click here

🚀 Usage

✅ CommonJS (Node.js)

const sendMail = require("@jubayer_shuvo/mailer-js");

sendMail({
  apiKey: "your-api-key",
  to: "recipient@example.com",
  subject: "Hello!",
  text: "This is a test email.",
})
  .then(() => console.log("Email sent successfully!"))
  .catch(console.error);

✅ ESModules / TypeScript

import sendMail from "@jubayer_shuvo/mailer-js";

await sendMail({
  apiKey: "your-api-key",
  to: "recipient@example.com",
  subject: "Hello!",
  text: "This is a test email.",
});

📄 API

sendMail(options: SendMailOptions): Promise<{ success: boolean }>

Parameters:

NameTypeRequiredDescription
apiKeystringYour email API key
tostringRecipient email address
subjectstringEmail subject
textstringEmail plain text content

📃 License

MIT © Md Jubayer

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago