@team_seki/sendgrid-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

sendgrid-plugin

This library was generated with Nx.

Usage

Create file sendgrid_default_settings.json

{
  "api_key": "your_personal_key"
}

Send email

import { SendgridPlugin } from '@team_seki/sendgrid-plugin'

const sendgrid = new SendgridPlugin().getMailService()

const message =
  {
    to: 'example@gmail.com',
    from: 'no-reply@gmail.com', // Use the email address or domain you verified above
    subject: 'Sending with Twilio SendGrid is Fun',
    text: 'and easy to do anywhere, even with Node.js',
    html: '<strong>and easy to do anywhere, even with Node.js</strong>',
  };

sendgrid
  .send(message)
  .then(() => console.log('Mail sent successfully'))
  .catch(error => {
    console.error(error);
  });

Building

Run nx build sendgrid-plugin to build the library.

Running unit tests

Run nx test sendgrid-plugin to execute the unit tests via Jest.

Readme

Keywords

none

Package Sidebar

Install

npm i @team_seki/sendgrid-plugin

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

4.35 kB

Total Files

8

Last publish

Collaborators

  • moisesugarcia
  • kmilo8346
  • dmunozgaete