open-index/open-npm huggingface dataset:
npm package: @jagu.cz/zimbra-client
Description: This repository contains the implementation of a Zimbra mail client for Node.js.
Latest version: 1.0.0

# 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`:

```bash
npm install @jagus/zimbra-client
```


## Example usage

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

```typescript
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')])
    }]
})
```