1.0.0 • Published 1 year ago

@jagu.cz/zimbra-client v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Zimbra mail client for Node.js

This repository contains the implementation of a Zimbra mail client for Node.js.

Installation

To install Zimbra mail client, use npm:

npm install @jagus/zimbra-client

Example usage

Here is a simple example of how to use the Zimbra mail client:

import { ZimbraClient } from '@jagus/zimbra-client'

const client = new ZimbraClient(
    'sender@jagu.cz', // Required, sender address
    'superSecretPassword!', // Required, sender password
    'mail.jagu.cz' // Optional, default is mail.jagu.cz
)

await client.send({
    from: { // Optional, default is sender address
        name: "Sender Name",
        email: 'sender@jagu.cz'
    },
    to: 'world@jagu.cz', // Required
    subject: 'test', // Required
    content: [{
        type: 'text/html',
        value: "<b>Hello world!</b>"
    }],
    attachments: [{
        filename: "example.md",
        content: new Blob([fs.readFileSync('./example.md')])
    }]
})
1.0.0

1 year ago