1.0.2 • Published 7 months ago
gost-brevo v1.0.2
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: 'xxx@yyyy.com',
name: 'Karpaga Prabhu'
},
{
email: 'zzz@aaa.com',
name: 'King'
}];
var from = {
email: 'no-reply@mailpackage.com',
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='<202310271940.92676148812@smtp-relay.mailin.fr>'
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 godofsoftwaret@gmail.com--MK-3794-{P}