sendim
v1.2.214
Published
[![Test Coverage](https://api.codeclimate.com/v1/badges/0505e350e23c43359432/test_coverage)](https://codeclimate.com/github/qlaffont/sendim/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/0505e350e23c43359432/maintainability)](htt
Downloads
2,947
Readme
Sendim
A simple library to send email cross providers. Old Owner: @flexper
Usage
import { Sendim } from 'sendim';
const sendim = new Sendim();
await sendim.addTransport<SendimSampleProviderConfig>(SendimSampleProvider, {});
await sendim.sendTransactionalMail({
templateId: 'test',
to: [{
email: '[email protected]'
}],
sender: {
email: '[email protected]'
}
});
addTransport(sendimProvider, config?)
Add transport to sendim
Params
| Field Name | Type | Default | Description | | ------------- | ---------------------------------------- | -------- | ------------------- | | sendimProvider | Class implements SendimTransportInterface | required | Provider to use | | config | object | {} | Config for provider |
sendRawEmail(options)
Send raw email
Params
| Field Name | Type | Default | Description | | ---------- | -------------- | -------- | --------------------- | | options | RawMailOptions | required | options to send email |
sendTransactionalEmail(options)
Send transactional email
Params
| Field Name | Type | Default | Description | | ---------- | ------------------------ | -------- | --------------------- | | options | TransactionalMailOptions | required | options to send email |
Tests
To execute jest tests (all errors, type integrity test)
pnpm test
Maintain
This package use TSdx. Please check documentation to update this package.