@mont3ch/mailing
v0.2.2
Published
Mailing library layer
Downloads
2
Readme
mailing
Mailing library layer
HOW TO USE
In this earlier version I'm exposing a class for each integration we have. In order to use the library please:
- Download it using
npm install @mont3ch/mailing --save
import { Sendgrid } from '@mont3ch/mailing';
const configuration = {
apiKey: 'my-sendgrid-api-key',
apiKeyId: 'my-sendgrid-api-key-id'
}
const mailData = {
to: ['[email protected]'],
from: '[email protected]',
subject: 'my subject',
text: 'my email text'
}
const mail = new Sendgrid(configuration);
try {
await mail.sendMail(mailData);
} catch(error){
console.log('an error ocurred', error);
}