New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

zeptomail

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zeptomail

Send mail via Node.js with ZeptoMail

latest
npmnpm
Version
7.0.2
Version published
Weekly downloads
19K
6.61%
Maintainers
1
Weekly downloads
 
Created
Source

Send mail via Node

🛠️ Installation

To install the ZeptoMail, you first need to Sign Up to ZOHO.

Then you need to install Node.js and npm.

Installing zeptomail is simple and easy. Start by entering the following command in your system terminal:

npm install zeptomail

📊 Obtain an API Key

Grab your API Key from the Zeptomail

📒 Example

Example for email sending (sendMail), sending single email using tempalte (sendMailWithTemplate) and sending batch emails using template (mailBatchWithTemplate) are available below.

Send mail

// For ES6, set type: "module" in package.json.
import { SendMailClient } from "zeptomail";

// For CommonJS
var { SendMailClient } = require("zeptomail");

const url = "api.zeptomail.com/";
const token = "<Send mail token>";

let client = new SendMailClient({url, token});

client.sendMail({
    "from": 
    {
        "address": "test@example.com",
        "name": "test"
    },
    "to": 
    [
        {
        "email_address": 
            {
                "address": "test1@example.com",
                "name": "test1"
            }
        }
    ],
    "reply_to": 
    [
        {
            "address": "test2@example.com",
            "name": "test2"
        } 
    ],
    "subject": "Sending with ZeptoMail to have good experience",
    "textbody": "Easy to do from anywhere, with  Node.js",
    "htmlbody": "<strong>Easy to do from anywhere, with  Node.js</strong>",
    "cc": 
    [
        {
        "email_address": 
            {
                "address": "test3@example.com",
                "name": "test3"
            }
        }
    ],
    "bcc": 
    [
        {
        "email_address": 
            {
                "address": "test4@example.com",
                "name": "test4"
            }
        }
    ],
    "track_clicks": true,
    "track_opens": true,
    "client_reference": "<client reference>",
    "mime_headers": 
        {
            "X-Zylker-User": "test-xxxx"
        },
    "attachments": 
    [
        {
            "content": "..x+SEXa3zKfnDnBA2qExtXikBpUAFABQAhGSPY/0IoAWgD/2Q==",
            "mime_type": "image/jpg",
            "name": "DM-welcome-guide"
        },
        {
            "file_cache_key": "<File Cache Key>",
            "name": "DM-reports"
        }
    ],
    "inline_images": 
    [
        {
            "mime_type": "image/jpg",
            "content": "...x+SEXa3zKfnDnBA2qExtXikBpUAFABQAhGSPY/0IoAWgD/2Q==",
            "cid": "img-welcome-design"
        },
        {
            "file_cache_key": "<File Cache Key>",
            "cid": "img-CTA"
        }
    ]
}).then((resp) => console.log("success")).catch((error) => console.log("error"));

Send batch mail

// For ES6, set type: "module" in package.json.
import { SendMailClient } from "zeptomail";

// For CommonJS
var { SendMailClient } = require("zeptomail");

const url = "api.zeptomail.com/";
const token = "<Send mail token>";

client.sendBatchMail({
    "from": {
        "address": "test@example.com",
        "name": "test"
    },
    "to": [
        {
            "email_address": {
                "address": "test1@example.com",
                "name": "test1"
            },
            "merge_info": {
                "name": "Micheal scott"
            }
        }
    ],
    "reply_to": 
    [
        {
            "address": "test2@example.com",
            "name": "test2"
        } 
    ],
    "subject": "Sending with ZeptoMail to have good experience",
    "textbody": "Hi {{name}}, sending email is easy to do from anywhere, with  Node.js",
    "htmlbody": "Hi {{name}},<br /><strong> Sending email is easy to do from anywhere, with  Node.js</strong>",
    "cc": 
    [
        {
        "email_address": 
            {
                "address": "test3@example.com",
                "name": "test3"
            }
        }
    ],
    "bcc": 
    [
        {
        "email_address": 
            {
                "address": "test4@example.com",
                "name": "test4"
            }
        }
    ],
    "track_clicks": true,
    "track_opens": true,
    "client_reference": "<client reference>",
    "mime_headers": 
        {
            "X-Zylker-User": "test-xxxx"
        },
    "attachments": 
    [
        {
            "content": "..x+SEXa3zKfnDnBA2qExtXikBpUAFABQAhGSPY/0IoAWgD/2Q==",
            "mime_type": "image/jpg",
            "name": "DM-welcome-guide"
        },
        {
            "file_cache_key": "<File Cache Key>",
            "name": "DM-reports"
        }
    ],
    "inline_images": 
    [
        {
            "mime_type": "image/jpg",
            "content": "...x+SEXa3zKfnDnBA2qExtXikBpUAFABQAhGSPY/0IoAWgD/2Q==",
            "cid": "img-welcome-design"
        },
        {
            "file_cache_key": "<File Cache Key>",
            "cid": "img-CTA"
        }
    ]
}).then((resp) => console.log("success")).catch((error) => console.log("error"));

Send template mail

// For ES6, set type: "module" in package.json.
import { SendMailClient } from "zeptomail";

// For CommonJS
var { SendMailClient } = require("zeptomail");

const url = "api.zeptomail.com/";
const token = "<Send mail token>";

client.sendMailWithTemplate({
    "template_key": "<template key>",
    "template_alias": "<template's alias>",
    "from": {
        "address": "test@example.com",
        "name": "test"
    },
    "to": [
        {
            "email_address": {
                "address": "test1@example.com",
                "name": "test1"
            }
        }
    ],
    "cc": [
        {
            "email_address": {
                "address": "test3@example.com",
                "name": "test3"
            }
        }
    ],
    "bcc": [
        {
            "email_address": {
                "address": "test5@example.com",
                "name": "test5"
            }
        }
    ],
    "merge_info": {
        "contact_number": "8787xxxxxx789",
        "company": "example.com"
    },
    "reply_to": [
        {
            "address": "test7@example.com",
            "name": "test7"
        }
    ],
    "client_reference": "<client reference>",
    "mime_headers": {
        "X-Test": "test"
    }
}).then((resp) => console.log("success")).catch((error) => console.log("error"));

Send batch template mail

// For ES6, set type: "module" in package.json.
import { SendMailClient } from "zeptomail";

// For CommonJS
var { SendMailClient } = require("zeptomail");

const url = "api.zeptomail.com/";
const token = "<Send mail token>";

client.mailBatchWithTemplate({
    "template_key": "<template's key>",
    "template_alias": "<template's alias>",
    "from": {
        "address": "test@example.com",
        "name": "test"
    },
    "to": [
        {
            "email_address": {
                "address": "test1@example.com",
                "name": "test1"
            },
            "merge_info": {
                "contact_number": "8787xxxxxx789",
                "company": "example.com"
            }
        }
    ],
    "reply_to": [
        {
            "address": "test@example.com",
            "name": "test"
        }
    ],
    "client_reference": "<client reference>",
    "mime_headers": {
        "X-Test": "test"
    }
}).then((resp) => console.log("success")).catch((error) => console.log("error"));

📒 Contact Us

Contact us at support@zeptomail.com for any questions regarding Zoho ZeptoMail.

FAQs

Package last updated on 18 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts