sendim-sendgrid
v1.0.0
Published
A simple library to send email with Sendim for SendGrid.
Downloads
8
Readme
sendim-sendgrid
A simple library to send email with Sendim for SendGrid.
Attachments Warning
- Attachment content should be sent as base64
Usage
import { Sendim } from 'sendim';
import { SendimSendgridProviderConfig, SendimSendgridProvider } from 'sendim-sendgrid';
const sendim = new Sendim();
await sendim.addTransport<SendimSendgridProviderConfig>(
SendimSendgridProvider,
{ apiKey: process.env.SENDGRID_APIKEY! },
);
await sendim.sendTransactionalMail({
templateId: '6',
to: [
{
email: '[email protected]',
},
],
sender: {
email: '[email protected]',
},
});
Tests
To execute jest tests (all errors, type integrity test)
pnpm test
Maintain
This package use TSdx. Please check documentation to update this package.