1.2.1 • Published 4 years ago
@eucalyptusvc/sendgrid v1.2.1
@eucalyptusvc/sendgrid
This is a dedicated module for interaction with the mail endpoint of the Sendgrid v3 API.
Install
With yarn:
yarn add @eucalyptusvc/sendgrid
With npm:
npm install @eucalyptusvc/sendgrid
Usage
import { Sendgrid } from '@eucalyptusvc/sendgrid';
const mailer = new Sendgrid({
brand: 'Pilot',
apiKey: process.env.SENDGRID_API_KEY,
email: 'gday@pilot.com.au',
});
const data = {
email: 'hello@eucalyptus.vc',
templateId: 'd-xxxxxxxxxxxxxxxx',
variables: {
action_url: 'https://eucalyptus.vc',
firstName: 'Thomas',
},
};
(async (): Promise<void> => {
try {
await mailer.send({
to: data.email,
templateId: data.templateId,
variables: {
...data.variables,
},
});
} catch (error) {
console.error(error.message);
}
})();
Development
- Install dependencies using
yarn install
ornpm install
- Start development server using
yarn watch
1.2.1
4 years ago
1.2.0
4 years ago
1.1.38
4 years ago
1.1.36
5 years ago
1.1.35
5 years ago
1.1.34
5 years ago
1.1.33
5 years ago
1.1.31
5 years ago
1.1.30
5 years ago
1.1.28
5 years ago
1.1.27
5 years ago
1.1.26
5 years ago
1.1.25
5 years ago
1.1.24
5 years ago
1.1.23
5 years ago
1.1.22
5 years ago
1.1.21
5 years ago
1.1.20
5 years ago
1.1.18
5 years ago
1.1.17
5 years ago
1.1.16
5 years ago
1.1.15
5 years ago
1.1.14
5 years ago
1.1.13
5 years ago
1.1.12
5 years ago
1.1.11
5 years ago
1.1.10
5 years ago
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago