sendim-sendgrid
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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: 'test@test.fr',
    },
  ],
  sender: {
    email: 'test@test.fr',
  },
});

Tests

To execute jest tests (all errors, type integrity test)

pnpm test

Maintain

This package use TSdx. Please check documentation to update this package.

Readme

Keywords

none

Package Sidebar

Install

npm i sendim-sendgrid

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

48 kB

Total Files

12

Last publish

Collaborators

  • qlaffont