mail-manager-client
v0.0.0
Published
client for mail-manager
Downloads
1
Readme
Mail Manager Client
const env = require('./config')
const axios = require('axios')
const mailer = require('./mail-client')(axios, env)
const main = async () => {
// first aproach
const result = await mailer
.to('[email protected]')
.subject('wow message')
.template('this is html')
.send()
// second aproach
const result = await mailer.send({
to: "[email protected]",
subject: "new message",
template: "hello ${user.name}",
})
console.log(result)
}
main()
output
{
isCargo: true,
serial: '44974',
createdAt: '2020-03-23T10:49:18.161Z',
details: {
accepted: [ '[email protected]' ],
rejected: [],
envelopeTime: 882,
messageTime: 1570,
messageSize: 270,
response: '250 2.0.0 OK 1584960562 b26sm4901759oti.3 - gsmtp',
envelope: { from: '[email protected]', to: [Array] },
messageId: '<[email protected]>',
sent: true
}
}