gost-brevo
v1.0.2
Published
Brevo node js integration
Downloads
15
Maintainers
Readme
gost-brevo
Brevo email service node js integration. Developed by GOST.
Install npm package
npm install gost-brevo
import {gostSendTransacMail, gostMailInfo, gostMailAllInfo, gostGetLast1000TransacMailLogs} from 'gost-brevo'
//To send a transaction mail
var to = [{
email: '[email protected]',
name: 'Karpaga Prabhu'
},
{
email: '[email protected]',
name: 'King'
}];
var from = {
email: '[email protected]',
name: 'Mail'
};
var subject = 'Test Email Subject';
var body = 'This is the body content of the email.';
var contentType = 'html' / 'text'
var apiKey='xkeysib-xxxxxxxxxxx' //Brevo API key
gostSendTransacMail(from, to, cc, Bcc, subject, body, contentType, apiKey).then(data=>console.log(data))
//Get just a info
var messageId='<[email protected]>'
var apiKey='xkeysib-xxxxxxxxxxx' //Brevo API key
gostMailInfo(messageId, apiKey).then(data=>console.log(data))
// Get all info
var uuid='f8036f60-e338-436d-aefe-f5fc9acf6385'
var apiKey='xkeysib-xxxxxxxxxxx' //Brevo API key
gostMailAllInfo(uuid, apiKey).then(data=>console.log(data))
//Get last 1000 transaction mail log
var apiKey='xkeysib-xxxxxxxxxxx' //Brevo API key
gostGetLast1000TransacMailLogs(apiKey).then(data=>console.log(data))
Developer Contact gost at [email protected]{P}