📧 Email Sending API Documentation

🔑 Your API Key

Get Api Key

🚀 Send Email Endpoint

Send an email using your linked Gmail, Outlook and Zoho account.

POST https://mailer-js.vercel.app/api/send-mail-external
Content-Type: application/json

{
  apiKey: "apiKey",
  to: "freind@example.com",
  subject": "Greetings from JSCoder",
  text: "Hello, this is a test email sent via API."
}

📄 Package Documentation

📦 Installation

npm install @jubayer_shuvo/mailer-js

🚀 Usage

✅ CommonJS

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

sendMail({
  apiKey: "apiKey",
  to: "freind@example.com",
  subject: "Greetings from JSCoder",
  text: "Hello, this is a test email sent via API.",
}).then(() => console.log("Email sent!")).catch(console.error);

✅ ESModules / TypeScript

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

await sendMail({
  apiKey: "apiKey",
  to: "freind@example.com",
  subject: "Greetings from JSCoder",
  text: "Hello, this is a test email sent via API."
}).then(() => console.log("Email sent!")).catch(console.error);

📋 API Parameters

✅ Success Response

{
  "success": true
}

❌ Error Responses