sendim
v1.2.295
Published
[](https://codeclimate.com/github/qlaffont/sendim/test_coverage) [](htt
Downloads
822
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 testMaintain
This package use TSdx. Please check documentation to update this package.
