@jagu.cz/zimbra-client
v1.0.0
Published
This repository contains the implementation of a Zimbra mail client for Node.js.
Downloads
19
Readme
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-clientExample usage
Here is a simple example of how to use the Zimbra mail client:
import { ZimbraClient } from '@jagus/zimbra-client'
const client = new ZimbraClient(
'[email protected]', // 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: '[email protected]'
},
to: '[email protected]', // Required
subject: 'test', // Required
content: [{
type: 'text/html',
value: "<b>Hello world!</b>"
}],
attachments: [{
filename: "example.md",
content: new Blob([fs.readFileSync('./example.md')])
}]
})